Fix clippy nightly nits

This commit is contained in:
Joseph Birr-Pixton 2022-11-27 12:45:14 +00:00 committed by Dirkjan Ochtman
parent eaa47e382e
commit 425c6c2443
3 changed files with 3 additions and 3 deletions

View File

@ -471,7 +471,7 @@ fn make_config(args: &Args) -> Arc<rustls::ClientConfig> {
if args.flag_cafile.is_some() {
let cafile = args.flag_cafile.as_ref().unwrap();
let certfile = fs::File::open(&cafile).expect("Cannot open CA file");
let certfile = fs::File::open(cafile).expect("Cannot open CA file");
let mut reader = BufReader::new(certfile);
root_store.add_parsable_certificates(&rustls_pemfile::certs(&mut reader).unwrap());
} else {

View File

@ -541,7 +541,7 @@ fn load_private_key(filename: &str) -> rustls::PrivateKey {
fn load_ocsp(filename: &Option<String>) -> Vec<u8> {
let mut ret = Vec::new();
if let &Some(ref name) = filename {
if let Some(name) = filename {
fs::File::open(name)
.expect("cannot open ocsp file")
.read_to_end(&mut ret)

View File

@ -619,7 +619,7 @@ pub struct NoClientAuth;
impl NoClientAuth {
/// Constructs a `NoClientAuth` and wraps it in an `Arc`.
pub fn new() -> Arc<dyn ClientCertVerifier> {
Arc::new(NoClientAuth)
Arc::new(Self)
}
}