chiark / gitweb /
clippy: Miscellaneous minor changes, and allow lints
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 31 Mar 2022 00:06:54 +0000 (01:06 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 31 Mar 2022 00:10:17 +0000 (01:10 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
clippy-options
src/bundles.rs
src/sshkeys.rs

index c8a71c48d451c442540bfc2af9611a95ca52afde..ccf4fce626ce97f3b1a93d58078c42fe4e32363d 100644 (file)
@@ -8,3 +8,8 @@
 -A clippy::needless_lifetimes
 -A clippy::upper_case_acronyms
 -A clippy::unused_unit
+-A clippy::manual_flatten
+-A clippy::clone_on_copy
+-A clippy::comparison_to_empty
+-A clippy::try_err
+-A clippy::unit_arg # does badly with if_chain, at least
index b0399746d7958d352a499af19da348e7d1bc9c3c..5e419e5baf8c70ac76176ec78e252178dc19517d 100644 (file)
@@ -390,7 +390,6 @@ impl IndexedZip where {
       let sname = entry.name().to_owned();
       let uname = UniCase::new(sname.to_owned());
       if let Some(previously) = members.insert(uname, i) {
-        let sname = sname.to_owned();
         drop(entry);
         let previously = za.by_index_raw(previously)?;
         let previously = previously.name();
index 0eb67c4a730b6084df0e7251835a351fa5d46e32..26f435c81daf4d9f2ccc426a7814d7b9ced20a2d 100644 (file)
@@ -209,7 +209,7 @@ impl PerScope {
         if let Some(sk) = sk;
         if sk.id == authed_key.id;
         if let Some(want_key) = gl.keys.get(sk.id);
-        if &want_key.nonce == &authed_key.nonce;
+        if want_key.nonce == authed_key.nonce;
         then {
           // We have checked id and nonce, against those allowed
           let auth = auth_in.so_promise();