mirror of
https://github.com/actix/actix-web.git
synced 2025-02-19 20:36:16 +00:00
chore: address clippy lints
This commit is contained in:
parent
182055bcb5
commit
33b487e854
3 changed files with 4 additions and 1 deletions
|
@ -105,7 +105,7 @@ fn hex_pair_to_char(d1: u8, d2: u8) -> Option<u8> {
|
|||
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)]
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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::<usize>::build();
|
||||
|
|
Loading…
Reference in a new issue