diff --git a/actix-router/src/quoter.rs b/actix-router/src/quoter.rs index 6c929d3ac..78694ed72 100644 --- a/actix-router/src/quoter.rs +++ b/actix-router/src/quoter.rs @@ -105,7 +105,7 @@ fn hex_pair_to_char(d1: u8, d2: u8) -> Option { let d_low = char::from(d2).to_digit(16)?; // left shift high nibble by 4 bits - Some((d_high as u8) << 4 | (d_low as u8)) + Some(((d_high as u8) << 4) | (d_low as u8)) } #[derive(Debug, Default, Clone)] diff --git a/actix-router/src/resource.rs b/actix-router/src/resource.rs index 3a102945b..7069b5fea 100644 --- a/actix-router/src/resource.rs +++ b/actix-router/src/resource.rs @@ -1021,6 +1021,7 @@ impl ResourceDef { panic!("prefix resource definitions should not have tail segments"); } + #[allow(clippy::literal_string_with_formatting_args)] if unprocessed.ends_with('*') { // unnamed tail segment @@ -1369,6 +1370,7 @@ mod tests { assert_eq!(path.unprocessed(), ""); } + #[expect(clippy::literal_string_with_formatting_args)] #[test] fn newline_patterns_and_paths() { let re = ResourceDef::new("/user/a\nb"); diff --git a/actix-router/src/router.rs b/actix-router/src/router.rs index 1dd4449da..01f92e90b 100644 --- a/actix-router/src/router.rs +++ b/actix-router/src/router.rs @@ -145,6 +145,7 @@ mod tests { }; #[allow(clippy::cognitive_complexity)] + #[expect(clippy::literal_string_with_formatting_args)] #[test] fn test_recognizer_1() { let mut router = Router::::build();