aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2021-07-05 13:54:47 -0400
committerJesse Luehrs <doy@tozt.net>2021-07-05 14:56:31 -0400
commit2fbbcc66c1d14639aa6fad92688ffcd46c8a5533 (patch)
treeb7900363b0cf5efb5b3a460ca6925792548ea7fd
parent72f64ca23ce14f4497fb3e762672b82454ddd892 (diff)
downloadrbw-2fbbcc66c1d14639aa6fad92688ffcd46c8a5533.tar.gz
rbw-2fbbcc66c1d14639aa6fad92688ffcd46c8a5533.zip
clippy
-rw-r--r--src/api.rs2
-rw-r--r--src/bin/rbw/commands.rs2
-rw-r--r--src/protocol.rs3
3 files changed, 5 insertions, 2 deletions
diff --git a/src/api.rs b/src/api.rs
index c9cd24f..ef0f73d 100644
--- a/src/api.rs
+++ b/src/api.rs
@@ -1059,7 +1059,7 @@ fn classify_login_error(error_res: &ConnectErrorRes, code: u16) -> Error {
error_res.two_factor_providers.as_ref()
{
return Error::TwoFactorRequired {
- providers: providers.to_vec(),
+ providers: providers.clone(),
};
}
}
diff --git a/src/bin/rbw/commands.rs b/src/bin/rbw/commands.rs
index 1ceb409..53310d7 100644
--- a/src/bin/rbw/commands.rs
+++ b/src/bin/rbw/commands.rs
@@ -55,7 +55,7 @@ impl DecryptedCipher {
.iter()
.copied()
.cloned()
- .filter_map(|x| x)
+ .flatten()
.collect();
if names.is_empty() {
eprintln!("entry for '{}' had no name", desc);
diff --git a/src/protocol.rs b/src/protocol.rs
index 203e6b9..a4b9722 100644
--- a/src/protocol.rs
+++ b/src/protocol.rs
@@ -1,3 +1,6 @@
+// https://github.com/rust-lang/rust-clippy/issues/6902
+#![allow(clippy::use_self)]
+
// eventually it would be nice to make this a const function so that we could
// just get the version from a variable directly, but this is fine for now
pub fn version() -> u32 {