mirror of
https://github.com/fafhrd91/actix-web
synced 2025-06-26 06:57:43 +02:00
address clippy lints
For intrepid commit message readers: The choice to add allows for the inlined format args lint instead of actually inlining them is not very clear because our actual real world MSRV is not clear. We currently claim 1.60 is our MSRV but this is mainly due to dependencies. I'm fairly sure that we could support < 1.58 if those deps are outdated in a users lockfile. We'll remove these allows again at some point soon.
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
#![allow(clippy::uninlined_format_args)]
|
||||
|
||||
use std::error::Error as StdError;
|
||||
|
||||
#[tokio::main]
|
||||
|
@ -210,7 +210,7 @@ where
|
||||
};
|
||||
self.add_default_header((
|
||||
header::AUTHORIZATION,
|
||||
format!("Basic {}", base64::encode(&auth)),
|
||||
format!("Basic {}", base64::encode(auth)),
|
||||
))
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,8 @@
|
||||
#![allow(
|
||||
clippy::type_complexity,
|
||||
clippy::borrow_interior_mutable_const,
|
||||
clippy::needless_doctest_main
|
||||
clippy::needless_doctest_main,
|
||||
clippy::uninlined_format_args
|
||||
)]
|
||||
#![doc(html_logo_url = "https://actix.rs/img/logo.png")]
|
||||
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")]
|
||||
|
@ -238,7 +238,7 @@ impl ClientRequest {
|
||||
|
||||
self.insert_header((
|
||||
header::AUTHORIZATION,
|
||||
format!("Basic {}", base64::encode(&auth)),
|
||||
format!("Basic {}", base64::encode(auth)),
|
||||
))
|
||||
}
|
||||
|
||||
@ -565,6 +565,8 @@ mod tests {
|
||||
assert_eq!(req.head.version, Version::HTTP_2);
|
||||
|
||||
let _ = req.headers_mut();
|
||||
|
||||
#[allow(clippy::let_underscore_future)]
|
||||
let _ = req.send_body("");
|
||||
}
|
||||
|
||||
|
@ -236,7 +236,7 @@ impl WebsocketsRequest {
|
||||
Some(password) => format!("{}:{}", username, password),
|
||||
None => format!("{}:", username),
|
||||
};
|
||||
self.header(AUTHORIZATION, format!("Basic {}", base64::encode(&auth)))
|
||||
self.header(AUTHORIZATION, format!("Basic {}", base64::encode(auth)))
|
||||
}
|
||||
|
||||
/// Set HTTP bearer authentication header
|
||||
@ -503,6 +503,8 @@ mod tests {
|
||||
.unwrap(),
|
||||
"Bearer someS3cr3tAutht0k3n"
|
||||
);
|
||||
|
||||
#[allow(clippy::let_underscore_future)]
|
||||
let _ = req.connect();
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
#![allow(clippy::uninlined_format_args)]
|
||||
|
||||
use std::{
|
||||
collections::HashMap,
|
||||
convert::Infallible,
|
||||
|
Reference in New Issue
Block a user