diff options
Diffstat (limited to '')
-rw-r--r-- | examples/integration_wgpu/src/main.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/integration_wgpu/src/main.rs b/examples/integration_wgpu/src/main.rs index 8e0056f3..3ac458b3 100644 --- a/examples/integration_wgpu/src/main.rs +++ b/examples/integration_wgpu/src/main.rs @@ -33,7 +33,8 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> { web_sys::window() .and_then(|win| win.document()) .and_then(|doc| doc.get_element_by_id("iced_canvas")) - .and_then(|element| element.dyn_into::<HtmlCanvasElement>().ok())? + .and_then(|element| element.dyn_into::<HtmlCanvasElement>().ok()) + .expect("Canvas with id `iced_canvas` is missing") }; #[cfg(not(target_arch = "wasm32"))] env_logger::init(); |