diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index dcf2e8c96..5b6fb1863 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -32,7 +32,7 @@ jobs: rust: - stable - nightly - - 1.48 + - 1.51 features: - default - ssl diff --git a/Cargo.toml b/Cargo.toml index 715ac2758..b9de89364 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,7 @@ serde = "1" serde_derive = "1" serde_json = "1" sha1 = "0.6.0" -time = { version = "=0.3.2", features = [ "local-offset" ] } +time = { version = "0.3.5", features = [ "local-offset" ] } tiny_http = "0.8.1" url = "2" threadpool = "1" diff --git a/clippy.toml b/clippy.toml index f691ea3d2..829dd1c59 100644 --- a/clippy.toml +++ b/clippy.toml @@ -1 +1 @@ -msrv = "1.48" +msrv = "1.51" diff --git a/src/content_encoding.rs b/src/content_encoding.rs index cb015df65..a3244958e 100644 --- a/src/content_encoding.rs +++ b/src/content_encoding.rs @@ -74,7 +74,7 @@ pub fn apply(request: &Request, mut response: Response) -> Response { let encoding_preference = ["br", "gzip", "x-gzip", "identity"]; let accept_encoding_header = request.header("Accept-Encoding").unwrap_or(""); if let Some(preferred_index) = input::priority_header_preferred( - &accept_encoding_header, + accept_encoding_header, encoding_preference.iter().cloned(), ) { match encoding_preference[preferred_index] { @@ -84,7 +84,7 @@ pub fn apply(request: &Request, mut response: Response) -> Response { } } - return response; + response } // Returns true if the Content-Type of the response is a type that should be encoded. diff --git a/src/lib.rs b/src/lib.rs index c8d75791b..b2026f0b2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -915,7 +915,7 @@ impl Request { let param_pairs = self.raw_query_string().split('&'); param_pairs .filter(|pair| pair.starts_with(name_pattern)) - .map(|pair| pair.split('=').skip(1).next().unwrap_or("")) + .map(|pair| pair.split('=').nth(1).unwrap_or("")) .next() .map(|value| { percent_encoding::percent_decode(value.replace("+", " ").as_bytes())