Use futures-preview instead of futures
This commit is contained in:
parent
655978f480
commit
dd093c79d7
4 changed files with 6 additions and 6 deletions
|
|
@ -17,7 +17,7 @@ maintenance = { status = "actively-developed" }
|
||||||
[dependencies]
|
[dependencies]
|
||||||
iced = { version = "0.1.0-alpha", path = ".." }
|
iced = { version = "0.1.0-alpha", path = ".." }
|
||||||
dodrio = "0.1.0"
|
dodrio = "0.1.0"
|
||||||
futures = "0.1"
|
futures-preview = "=0.3.0-alpha.18"
|
||||||
wasm-bindgen = "0.2.50"
|
wasm-bindgen = "0.2.50"
|
||||||
|
|
||||||
[dependencies.web-sys]
|
[dependencies.web-sys]
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ crate-type = ["cdylib"]
|
||||||
[dependencies]
|
[dependencies]
|
||||||
iced_web = { path = "../.." }
|
iced_web = { path = "../.." }
|
||||||
wasm-bindgen = "0.2.50"
|
wasm-bindgen = "0.2.50"
|
||||||
futures = "0.1"
|
futures-preview = "=0.3.0-alpha.18"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
console_error_panic_hook = "0.1.6"
|
console_error_panic_hook = "0.1.6"
|
||||||
console_log = "0.1.2"
|
console_log = "0.1.2"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
use futures::{future, Future};
|
use futures::Future;
|
||||||
use iced_web::UserInterface;
|
use iced_web::UserInterface;
|
||||||
use wasm_bindgen::prelude::*;
|
use wasm_bindgen::prelude::*;
|
||||||
|
|
||||||
|
|
@ -23,10 +23,10 @@ impl iced_web::UserInterface for Tour {
|
||||||
fn update(
|
fn update(
|
||||||
&mut self,
|
&mut self,
|
||||||
message: tour::Message,
|
message: tour::Message,
|
||||||
) -> Box<dyn Future<Item = tour::Message, Error = ()>> {
|
) -> Option<Box<dyn Future<Output = tour::Message>>> {
|
||||||
self.update(message);
|
self.update(message);
|
||||||
|
|
||||||
Box::new(future::err(()))
|
None
|
||||||
}
|
}
|
||||||
|
|
||||||
fn view(&mut self) -> iced_web::Element<tour::Message> {
|
fn view(&mut self) -> iced_web::Element<tour::Message> {
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ pub trait UserInterface {
|
||||||
fn update(
|
fn update(
|
||||||
&mut self,
|
&mut self,
|
||||||
message: Self::Message,
|
message: Self::Message,
|
||||||
) -> Box<dyn Future<Item = Self::Message, Error = ()>>;
|
) -> Option<Box<dyn Future<Output = Self::Message>>>;
|
||||||
|
|
||||||
fn view(&mut self) -> Element<Self::Message>;
|
fn view(&mut self) -> Element<Self::Message>;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue