diff options
author | 2020-02-05 01:40:27 +0100 | |
---|---|---|
committer | 2020-02-05 01:40:27 +0100 | |
commit | 8f52604987038225ce90261f17fd8408f1a7ebe3 (patch) | |
tree | 095d453a7407cc727e6d91b95813331922233d8f /futures | |
parent | 28fd9feb40a024ea29f73fa91c21fc3f2cf01d58 (diff) | |
download | iced-8f52604987038225ce90261f17fd8408f1a7ebe3.tar.gz iced-8f52604987038225ce90261f17fd8408f1a7ebe3.tar.bz2 iced-8f52604987038225ce90261f17fd8408f1a7ebe3.zip |
Use `reqwest` and `tokio` in `pokedex` example
Diffstat (limited to 'futures')
-rw-r--r-- | futures/Cargo.toml | 6 | ||||
-rw-r--r-- | futures/src/executor.rs | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/futures/Cargo.toml b/futures/Cargo.toml index 91860e1e..483e60cb 100644 --- a/futures/Cargo.toml +++ b/futures/Cargo.toml @@ -19,12 +19,12 @@ log = "0.4" [dependencies.futures] version = "0.3" -[dependencies.tokio] +[target.'cfg(not(target_arch = "wasm32"))'.dependencies.tokio] version = "0.2" optional = true -features = ["rt-core"] +features = ["rt-core", "rt-threaded"] -[dependencies.async-std] +[target.'cfg(not(target_arch = "wasm32"))'.dependencies.async-std] version = "1.0" optional = true diff --git a/futures/src/executor.rs b/futures/src/executor.rs index c2b9cc72..2a5281af 100644 --- a/futures/src/executor.rs +++ b/futures/src/executor.rs @@ -4,10 +4,10 @@ mod null; #[cfg(feature = "thread-pool")] mod thread_pool; -#[cfg(feature = "tokio")] +#[cfg(all(not(target_arch = "wasm32"), feature = "tokio"))] mod tokio; -#[cfg(feature = "async-std")] +#[cfg(all(not(target_arch = "wasm32"), feature = "async-std"))] mod async_std; #[cfg(target_arch = "wasm32")] @@ -18,10 +18,10 @@ pub use null::Null; #[cfg(feature = "thread-pool")] pub use thread_pool::ThreadPool; -#[cfg(feature = "tokio")] +#[cfg(all(not(target_arch = "wasm32"), feature = "tokio"))] pub use self::tokio::Tokio; -#[cfg(feature = "async-std")] +#[cfg(all(not(target_arch = "wasm32"), feature = "async-std"))] pub use self::async_std::AsyncStd; #[cfg(target_arch = "wasm32")] |