Update to Rust 1.75.0

This commit is contained in:
Fabrice Reix 2024-01-03 11:17:44 +01:00
parent 5c21023399
commit 2a500c8412
No known key found for this signature in database
GPG Key ID: BF5213154B2E7155
4 changed files with 4 additions and 4 deletions

View File

@ -8,7 +8,7 @@ description = "Hurl, run and test HTTP requests"
documentation = "https://hurl.dev"
homepage = "https://hurl.dev"
repository = "https://github.com/Orange-OpenSource/hurl"
rust-version = "1.74.1"
rust-version = "1.75.0"
[lib]
name = "hurl"

View File

@ -674,7 +674,7 @@ impl Client {
if !(300..400).contains(&response_code) {
return None;
}
let location = match response.get_header_values("Location").get(0) {
let location = match response.get_header_values("Location").first() {
None => return None,
Some(value) => get_redirect_url(value, base_url),
};

View File

@ -90,7 +90,7 @@ impl Request {
/// Returns optional Content-type header value.
pub fn content_type(&self) -> Option<String> {
header::get_values(&self.headers, "Content-Type")
.get(0)
.first()
.cloned()
}

View File

@ -57,7 +57,7 @@ impl Response {
/// Returns optional Content-type header value.
pub fn content_type(&self) -> Option<String> {
header::get_values(&self.headers, "Content-Type")
.get(0)
.first()
.cloned()
}
}