Use reqwest and tokio in pokedex example
This commit is contained in:
parent
28fd9feb40
commit
8f52604987
4 changed files with 17 additions and 17 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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")]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue