Skip to content

Commit

Permalink
Merge pull request #170 from fenhl/http1
Browse files Browse the repository at this point in the history
Upgrade to http 1
  • Loading branch information
Byron authored May 15, 2024
2 parents 4be1703 + a925945 commit eae6947
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion examples/list_recent_versions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ fn names(name: &str) -> Result<impl Iterator<Item = String>, Box<dyn Error>> {
/// 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<Option<Crate>, Box<dyn Error>> {
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<String> = match request.call() {
Ok(response) => response.into(),
Expand Down
2 changes: 1 addition & 1 deletion examples/sparse_http_ureq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit eae6947

Please sign in to comment.