Allow switching executor::Default with features
This commit is contained in:
parent
e8316b2087
commit
ad500441af
6 changed files with 34 additions and 28 deletions
|
|
@ -6,8 +6,7 @@ edition = "2018"
|
|||
publish = false
|
||||
|
||||
[dependencies]
|
||||
iced = { path = "../..", features = ["image", "debug"] }
|
||||
iced_futures = { path = "../../futures", features = ["tokio"] }
|
||||
iced = { path = "../..", features = ["image", "debug", "tokio"] }
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
rand = { version = "0.7", features = ["wasm-bindgen"] }
|
||||
|
|
|
|||
|
|
@ -27,12 +27,7 @@ enum Message {
|
|||
}
|
||||
|
||||
impl Application for Pokedex {
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
type Executor = iced_futures::executor::Tokio;
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
type Executor = iced_futures::executor::WasmBindgen;
|
||||
|
||||
type Executor = iced::executor::Default;
|
||||
type Message = Message;
|
||||
|
||||
fn new() -> (Pokedex, Command<Message>) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue