1
0
Fork 0
mirror of https://github.com/dani-garcia/vaultwarden.git synced 2025-06-15 15:20:07 +00:00

Fixed some clippy lints and changed update_uuid_revision to only use one db query

This commit is contained in:
Daniel García 2019-02-08 18:45:07 +01:00
parent ef63342e20
commit 8b4a6f2a64
No known key found for this signature in database
GPG key ID: FC8A7D14C3CD543A
8 changed files with 32 additions and 27 deletions

View file

@ -117,8 +117,8 @@ fn post_eq_domains(data: JsonUpcase<EquivDomainData>, headers: Headers, conn: Db
let mut user = headers.user;
use serde_json::to_string;
user.excluded_globals = to_string(&excluded_globals).unwrap_or("[]".to_string());
user.equivalent_domains = to_string(&equivalent_domains).unwrap_or("[]".to_string());
user.excluded_globals = to_string(&excluded_globals).unwrap_or_else(|_| "[]".to_string());
user.equivalent_domains = to_string(&equivalent_domains).unwrap_or_else(|_| "[]".to_string());
user.save(&conn)?;