Skip to content

Commit

Permalink
chore: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Keruspe committed Oct 20, 2020
1 parent cc4bb94 commit 11196c8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
10 changes: 2 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ tokio03 = ["async-global-executor/tokio03"]
[dependencies]
async-attributes = { version = "1.1.1", 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-io = { version = "0.3.4", optional = true }
kv-log-macro = { version = "1.0.6", optional = true }
Expand All @@ -76,7 +76,7 @@ pin-utils = { version = "0.1.0-alpha.4", optional = true }
slab = { version = "0.4.2", optional = true }

# 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]
async-global-executor = { version = "1.4.0", optional = true, features = ["async-io"] }
Expand All @@ -92,12 +92,6 @@ futures-channel = { version = "0.3.4", optional = true }
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
wasm-bindgen-test = "0.3.10"

[dependencies.tokio]
version = "0.2"
default-features = false
features = ["rt-threaded"]
optional = true

[dev-dependencies]
femme = "2.1.1"
rand = "0.7.3"
Expand Down
7 changes: 4 additions & 3 deletions examples/surf-web.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
use async_std::task;

fn main() -> Result<(), surf::Exception> {
fn main() -> Result<(), surf::Error> {
task::block_on(async {
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?;

dbg!(url);
dbg!(response.status());
dbg!(response.version());
dbg!(response.headers());
dbg!(response.header_names());
dbg!(response.header_values());
dbg!(body.len());

Ok(())
Expand Down

0 comments on commit 11196c8

Please sign in to comment.