mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-11-29 23:11:02 +00:00
cargo fmt
This commit is contained in:
parent
f40634aa97
commit
4da9b24cb1
1 changed files with 9 additions and 8 deletions
|
@ -364,14 +364,15 @@ impl User {
|
||||||
let local_id = Instance::get_local()?.id;
|
let local_id = Instance::get_local()?.id;
|
||||||
let user = match User::find_by_email(conn, ident) {
|
let user = match User::find_by_email(conn, ident) {
|
||||||
Ok(user) => Ok(user),
|
Ok(user) => Ok(user),
|
||||||
_ => User::find_by_name(conn, ident, local_id),
|
_ => User::find_by_name(conn, ident, local_id),
|
||||||
}.and_then(|u| {
|
}
|
||||||
if u.instance_id == local_id {
|
.and_then(|u| {
|
||||||
Ok(u)
|
if u.instance_id == local_id {
|
||||||
} else {
|
Ok(u)
|
||||||
Err(Error::NotFound)
|
} else {
|
||||||
}
|
Err(Error::NotFound)
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
|
||||||
match user {
|
match user {
|
||||||
Ok(user) if user.hashed_password.is_some() => {
|
Ok(user) if user.hashed_password.is_some() => {
|
||||||
|
|
Loading…
Reference in a new issue