From a925945966d1da60bed757c1b0788082ef7b0417 Mon Sep 17 00:00:00 2001 From: Fenhl Date: Wed, 15 May 2024 03:12:12 +0000 Subject: [PATCH] Upgrade to http 1 --- Cargo.toml | 6 +++--- examples/list_recent_versions.rs | 2 +- examples/sparse_http_ureq.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 37afb7b3..f3a78de4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,7 +37,7 @@ required-features = ["git-https"] gix = { version = "0.62.0", default-features = false, features = ["max-performance-safe", "blocking-network-client"], optional = true } hex = { version = "0.4.3", features = ["serde"] } home = "0.5.4" -http = { version = "0.2", optional = true } +http = { version = "1", optional = true } memchr = "2.5.0" rayon = { version = "1.7.0", optional = true } rustc-hash = "1.1.0" @@ -56,8 +56,8 @@ bytesize = "1.2.0" cap = { version = "0.1.2", features = ["stats"] } is_ci = "1.1.1" tempfile = "3.5.0" -ureq = { version = "2.8.0", features = ["http-interop"] } -reqwest = { version = "0.11.18", features = ["blocking", "gzip"] } +ureq = { version = "2.8.0", features = ["http-crate"] } +reqwest = { version = "0.12", features = ["blocking", "gzip"] } serial_test = "2.0.0" parking_lot = "0.12.1" diff --git a/examples/list_recent_versions.rs b/examples/list_recent_versions.rs index b0e077ef..6160640d 100644 --- a/examples/list_recent_versions.rs +++ b/examples/list_recent_versions.rs @@ -77,7 +77,7 @@ fn names(name: &str) -> Result, Box> { /// Create a request to the sparse `index` and parse the response with the side-effect of yielding /// the desired crate and updating the local cache. fn update_cache(name: &str, index: &SparseIndex) -> Result, Box> { - let request: ureq::Request = index.make_cache_request(name)?.into(); + let request: ureq::Request = index.make_cache_request(name)?.try_into()?; let response: http::Response = match request.call() { Ok(response) => response.into(), diff --git a/examples/sparse_http_ureq.rs b/examples/sparse_http_ureq.rs index 6957eee1..4b601834 100644 --- a/examples/sparse_http_ureq.rs +++ b/examples/sparse_http_ureq.rs @@ -31,7 +31,7 @@ fn print_crate(index: &mut SparseIndex) { } fn update(index: &mut SparseIndex) { - let request: ureq::Request = index.make_cache_request(CRATE_TO_FETCH).unwrap().into(); + let request: ureq::Request = index.make_cache_request(CRATE_TO_FETCH).unwrap().try_into().unwrap(); let response = request .call()