mirror of
https://github.com/async-rs/async-std.git
synced 2025-01-30 17:25:32 +00:00
chore: update dependencies
This commit is contained in:
parent
cc4bb943b0
commit
11196c853d
2 changed files with 6 additions and 11 deletions
10
Cargo.toml
10
Cargo.toml
|
@ -63,7 +63,7 @@ tokio03 = ["async-global-executor/tokio03"]
|
||||||
[dependencies]
|
[dependencies]
|
||||||
async-attributes = { version = "1.1.1", optional = true }
|
async-attributes = { version = "1.1.1", optional = true }
|
||||||
async-mutex = { version = "1.1.3", optional = true }
|
async-mutex = { version = "1.1.3", optional = true }
|
||||||
crossbeam-utils = { version = "0.7.2", optional = true }
|
crossbeam-utils = { version = "0.8.0", optional = true }
|
||||||
futures-core = { version = "0.3.4", optional = true, default-features = false }
|
futures-core = { version = "0.3.4", optional = true, default-features = false }
|
||||||
futures-io = { version = "0.3.4", optional = true }
|
futures-io = { version = "0.3.4", optional = true }
|
||||||
kv-log-macro = { version = "1.0.6", optional = true }
|
kv-log-macro = { version = "1.0.6", optional = true }
|
||||||
|
@ -76,7 +76,7 @@ pin-utils = { version = "0.1.0-alpha.4", optional = true }
|
||||||
slab = { version = "0.4.2", optional = true }
|
slab = { version = "0.4.2", optional = true }
|
||||||
|
|
||||||
# Devdepencency, but they are not allowed to be optional :/
|
# Devdepencency, but they are not allowed to be optional :/
|
||||||
surf = { version = "1.0.3", optional = true }
|
surf = { version = "2.0.0", optional = true }
|
||||||
|
|
||||||
[target.'cfg(not(target_os = "unknown"))'.dependencies]
|
[target.'cfg(not(target_os = "unknown"))'.dependencies]
|
||||||
async-global-executor = { version = "1.4.0", optional = true, features = ["async-io"] }
|
async-global-executor = { version = "1.4.0", optional = true, features = ["async-io"] }
|
||||||
|
@ -92,12 +92,6 @@ futures-channel = { version = "0.3.4", optional = true }
|
||||||
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
|
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
|
||||||
wasm-bindgen-test = "0.3.10"
|
wasm-bindgen-test = "0.3.10"
|
||||||
|
|
||||||
[dependencies.tokio]
|
|
||||||
version = "0.2"
|
|
||||||
default-features = false
|
|
||||||
features = ["rt-threaded"]
|
|
||||||
optional = true
|
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
femme = "2.1.1"
|
femme = "2.1.1"
|
||||||
rand = "0.7.3"
|
rand = "0.7.3"
|
||||||
|
|
|
@ -1,15 +1,16 @@
|
||||||
use async_std::task;
|
use async_std::task;
|
||||||
|
|
||||||
fn main() -> Result<(), surf::Exception> {
|
fn main() -> Result<(), surf::Error> {
|
||||||
task::block_on(async {
|
task::block_on(async {
|
||||||
let url = "https://www.rust-lang.org";
|
let url = "https://www.rust-lang.org";
|
||||||
let mut response = surf::get(url).await?;
|
let mut response = surf::get(url).send().await?;
|
||||||
let body = response.body_string().await?;
|
let body = response.body_string().await?;
|
||||||
|
|
||||||
dbg!(url);
|
dbg!(url);
|
||||||
dbg!(response.status());
|
dbg!(response.status());
|
||||||
dbg!(response.version());
|
dbg!(response.version());
|
||||||
dbg!(response.headers());
|
dbg!(response.header_names());
|
||||||
|
dbg!(response.header_values());
|
||||||
dbg!(body.len());
|
dbg!(body.len());
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
Loading…
Reference in a new issue