summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-04-27 15:17:06 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-04-27 15:17:06 +0200
commit88d3247717b6deb38d500c8c1b1b1f32d6df9991 (patch)
tree649b38d442a39a82511926a363c0517d9d64ccf0 /examples
parent92d808ee73b261b639a4a8d1d4f930cd61a380c6 (diff)
downloadiced-88d3247717b6deb38d500c8c1b1b1f32d6df9991.tar.gz
iced-88d3247717b6deb38d500c8c1b1b1f32d6df9991.tar.bz2
iced-88d3247717b6deb38d500c8c1b1b1f32d6df9991.zip
Fix build of `integration` example for Wasm target
Diffstat (limited to 'examples')
-rw-r--r--examples/integration/src/main.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/integration/src/main.rs b/examples/integration/src/main.rs
index 98d2bc59..d9aae7b9 100644
--- a/examples/integration/src/main.rs
+++ b/examples/integration/src/main.rs
@@ -36,7 +36,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("Get canvas element")
};
#[cfg(not(target_arch = "wasm32"))]
env_logger::init();