mirror of https://github.com/ctz/rustls
Fix clippy nightly nits
This commit is contained in:
parent
eaa47e382e
commit
425c6c2443
|
@ -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 {
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue