summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-09-16 18:03:57 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-09-16 18:04:23 +0200
commitdd093c79d7da84675be648c7df2ebfc85b5039f2 (patch)
treef368ae73f58d52e4860cc4155d5ae0636df39c90 /web
parent655978f480c32bc696f0d5fe2fff834bfbf238ea (diff)
downloadiced-dd093c79d7da84675be648c7df2ebfc85b5039f2.tar.gz
iced-dd093c79d7da84675be648c7df2ebfc85b5039f2.tar.bz2
iced-dd093c79d7da84675be648c7df2ebfc85b5039f2.zip
Use `futures-preview` instead of `futures`
Diffstat (limited to 'web')
-rw-r--r--web/Cargo.toml2
-rw-r--r--web/examples/tour/Cargo.toml2
-rw-r--r--web/examples/tour/src/lib.rs6
-rw-r--r--web/src/lib.rs2
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<dyn Future<Item = tour::Message, Error = ()>> {
+ ) -> Option<Box<dyn Future<Output = tour::Message>>> {
self.update(message);
- Box::new(future::err(()))
+ None
}
fn view(&mut self) -> iced_web::Element<tour::Message> {
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<dyn Future<Item = Self::Message, Error = ()>>;
+ ) -> Option<Box<dyn Future<Output = Self::Message>>>;
fn view(&mut self) -> Element<Self::Message>;