Skip to content

Commit

Permalink
Update to Rust 1.84.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jcamiel committed Jan 17, 2025
1 parent fe96856 commit 30b9a1b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/hurl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.83.0"
rust-version = "1.84.0"

[lib]
name = "hurl"
Expand Down
2 changes: 1 addition & 1 deletion packages/hurl/src/html/entities.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use lazy_static::lazy_static;
// Generated from <https://html.spec.whatwg.org/entities.json> and
// <https://html.spec.whatwg.org/multipage/named-characters.html>.
// Map HTML5 named character references to the equivalent Unicode character(s).
const HTML5_ENTITIES: [(&str, &str); 2231] = [
static HTML5_ENTITIES: [(&str, &str); 2231] = [
("AElig", "\u{C6}"),
("AElig;", "\u{C6}"),
("AMP", "\u{26}"),
Expand Down
4 changes: 2 additions & 2 deletions packages/hurl/src/html/unescape.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use crate::html::entities::HTML5_ENTITIES_REF;

// Ref https://html.spec.whatwg.org/#decimal-character-reference-start-state

const INVALID_CHAR: [(u32, &str); 34] = [
static INVALID_CHAR: [(u32, &str); 34] = [
(0x00, "\u{fffd}"), // REPLACEMENT CHARACTER
(0x0d, "\r"), // CARRIAGE RETURN
(0x80, "\u{20ac}"), // EURO SIGN
Expand Down Expand Up @@ -66,7 +66,7 @@ lazy_static! {
INVALID_CHAR.iter().copied().collect();
}

const INVALID_CODEPOINTS: [u32; 126] = [
static INVALID_CODEPOINTS: [u32; 126] = [
// 0x0001 to 0x0008
0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, // 0x000E to 0x001F
0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d,
Expand Down
6 changes: 3 additions & 3 deletions packages/hurl/src/http/response_decoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,17 @@ impl Response {

/// Returns true if response is an HTML response.
pub fn is_html(&self) -> bool {
self.headers.content_type().map_or(false, mimetype::is_html)
self.headers.content_type().is_some_and(mimetype::is_html)
}

/// Returns true if response is a JSON response.
pub fn is_json(&self) -> bool {
self.headers.content_type().map_or(false, mimetype::is_json)
self.headers.content_type().is_some_and(mimetype::is_json)
}

/// Returns true if response is a XML response.
pub fn is_xml(&self) -> bool {
self.headers.content_type().map_or(false, mimetype::is_xml)
self.headers.content_type().is_some_and(mimetype::is_xml)
}

/// Decompresses HTTP body response.
Expand Down
2 changes: 1 addition & 1 deletion packages/hurl/src/runner/hurl_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ pub fn run_entries(
logger,
);

let has_error = results.last().map_or(false, |r| !r.errors.is_empty());
let has_error = results.last().is_some_and(|r| !r.errors.is_empty());

entries_result.extend(results);

Expand Down

0 comments on commit 30b9a1b

Please sign in to comment.