vw_small

Hardened fork of Vaultwarden (https://github.com/dani-garcia/vaultwarden) with fewer features.
git clone https://git.philomathiclife.com/repos/vw_small
Log | Files | Refs | README

commit aaba1e836838a6dd75d65d83d47346d733e3e752
parent ff2684dfeedc70b5d1b0afbe41b52d01cd8e0eb1
Author: Daniel GarcĂ­a <dani-garcia@users.noreply.github.com>
Date:   Fri, 28 Aug 2020 22:10:28 +0200

Fix some clippy warnings and remove unused function

Diffstat:
Msrc/db/mod.rs | 3++-
Msrc/db/models/cipher.rs | 2+-
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/db/mod.rs b/src/db/mod.rs @@ -136,6 +136,7 @@ macro_rules! db_run { pub trait FromDb { type Output; + #[allow(clippy::wrong_self_convention)] fn from_db(self) -> Self::Output; } @@ -173,7 +174,7 @@ macro_rules! db_object { )+ } impl [<$name Db>] { - #[inline(always)] pub fn from_db(self) -> super::$name { super::$name { $( $field: self.$field, )+ } } + #[allow(clippy::wrong_self_convention)] #[inline(always)] pub fn to_db(x: &super::$name) -> Self { Self { $( $field: x.$field.clone(), )+ } } } diff --git a/src/db/models/cipher.rs b/src/db/models/cipher.rs @@ -320,7 +320,7 @@ impl Cipher { // and `hide_passwords` columns. This could ideally be done as part // of the query, but Diesel doesn't support a max() or bool_or() // function on booleans and this behavior isn't portable anyway. - if let Some(vec) = query.load::<(bool, bool)>(conn).ok() { + if let Ok(vec) = query.load::<(bool, bool)>(conn) { let mut read_only = false; let mut hide_passwords = false; for (ro, hp) in vec.iter() {