diff options
Diffstat (limited to 'web/examples/tour/src/lib.rs')
-rw-r--r-- | web/examples/tour/src/lib.rs | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/web/examples/tour/src/lib.rs b/web/examples/tour/src/lib.rs deleted file mode 100644 index dbf04df8..00000000 --- a/web/examples/tour/src/lib.rs +++ /dev/null @@ -1,35 +0,0 @@ -use futures::Future; -use iced_web::UserInterface; -use wasm_bindgen::prelude::*; - -mod tour; - -use tour::Tour; - -#[wasm_bindgen(start)] -pub fn run() { - console_error_panic_hook::set_once(); - console_log::init_with_level(log::Level::Trace) - .expect("Initialize logging"); - - let tour = Tour::new(); - - tour.run(); -} - -impl iced_web::UserInterface for Tour { - type Message = tour::Message; - - fn update( - &mut self, - message: tour::Message, - ) -> Option<Box<dyn Future<Output = tour::Message>>> { - self.update(message); - - None - } - - fn view(&mut self) -> iced_web::Element<tour::Message> { - self.view() - } -} |