From 4da9b24cb14f5b4bfe707ba8b2f306d318a2f03a Mon Sep 17 00:00:00 2001 From: Trinity Pointard Date: Wed, 7 Oct 2020 23:40:27 +0200 Subject: [PATCH] cargo fmt --- plume-models/src/users.rs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/plume-models/src/users.rs b/plume-models/src/users.rs index 3d5feab0..80599e71 100644 --- a/plume-models/src/users.rs +++ b/plume-models/src/users.rs @@ -364,14 +364,15 @@ impl User { let local_id = Instance::get_local()?.id; let user = match User::find_by_email(conn, ident) { Ok(user) => Ok(user), - _ => User::find_by_name(conn, ident, local_id), - }.and_then(|u| { - if u.instance_id == local_id { - Ok(u) - } else { - Err(Error::NotFound) - } - }); + _ => User::find_by_name(conn, ident, local_id), + } + .and_then(|u| { + if u.instance_id == local_id { + Ok(u) + } else { + Err(Error::NotFound) + } + }); match user { Ok(user) if user.hashed_password.is_some() => {