From 2fbbcc66c1d14639aa6fad92688ffcd46c8a5533 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 5 Jul 2021 13:54:47 -0400 Subject: clippy --- src/api.rs | 2 +- src/bin/rbw/commands.rs | 2 +- src/protocol.rs | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src') 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 { -- cgit v1.2.3-54-g00ecf