From dd093c79d7da84675be648c7df2ebfc85b5039f2 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 16 Sep 2019 18:03:57 +0200 Subject: Use `futures-preview` instead of `futures` --- web/Cargo.toml | 2 +- web/examples/tour/Cargo.toml | 2 +- web/examples/tour/src/lib.rs | 6 +++--- web/src/lib.rs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/web/Cargo.toml b/web/Cargo.toml index 0ab89570..43377d46 100644 --- a/web/Cargo.toml +++ b/web/Cargo.toml @@ -17,7 +17,7 @@ maintenance = { status = "actively-developed" } [dependencies] iced = { version = "0.1.0-alpha", path = ".." } dodrio = "0.1.0" -futures = "0.1" +futures-preview = "=0.3.0-alpha.18" wasm-bindgen = "0.2.50" [dependencies.web-sys] diff --git a/web/examples/tour/Cargo.toml b/web/examples/tour/Cargo.toml index c2db46ec..65a860e2 100644 --- a/web/examples/tour/Cargo.toml +++ b/web/examples/tour/Cargo.toml @@ -11,7 +11,7 @@ crate-type = ["cdylib"] [dependencies] iced_web = { path = "../.." } wasm-bindgen = "0.2.50" -futures = "0.1" +futures-preview = "=0.3.0-alpha.18" log = "0.4" console_error_panic_hook = "0.1.6" console_log = "0.1.2" diff --git a/web/examples/tour/src/lib.rs b/web/examples/tour/src/lib.rs index 30855e8b..dbf04df8 100644 --- a/web/examples/tour/src/lib.rs +++ b/web/examples/tour/src/lib.rs @@ -1,4 +1,4 @@ -use futures::{future, Future}; +use futures::Future; use iced_web::UserInterface; use wasm_bindgen::prelude::*; @@ -23,10 +23,10 @@ impl iced_web::UserInterface for Tour { fn update( &mut self, message: tour::Message, - ) -> Box> { + ) -> Option>> { self.update(message); - Box::new(future::err(())) + None } fn view(&mut self) -> iced_web::Element { diff --git a/web/src/lib.rs b/web/src/lib.rs index 3173e736..5a0dd6f2 100644 --- a/web/src/lib.rs +++ b/web/src/lib.rs @@ -19,7 +19,7 @@ pub trait UserInterface { fn update( &mut self, message: Self::Message, - ) -> Box>; + ) -> Option>>; fn view(&mut self) -> Element; -- cgit