From: Ian Jackson Date: Thu, 31 Mar 2022 00:06:54 +0000 (+0100) Subject: clippy: Miscellaneous minor changes, and allow lints X-Git-Tag: otter-1.0.0~56 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=175541b40dc12fb389dcb5f50c5e8c569911fd03;p=otter.git clippy: Miscellaneous minor changes, and allow lints Signed-off-by: Ian Jackson --- diff --git a/clippy-options b/clippy-options index c8a71c48..ccf4fce6 100644 --- a/clippy-options +++ b/clippy-options @@ -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 diff --git a/src/bundles.rs b/src/bundles.rs index b0399746..5e419e5b 100644 --- a/src/bundles.rs +++ b/src/bundles.rs @@ -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(); diff --git a/src/sshkeys.rs b/src/sshkeys.rs index 0eb67c4a..26f435c8 100644 --- a/src/sshkeys.rs +++ b/src/sshkeys.rs @@ -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();