slightly shorten db.get_token
(no good reason other than i think it looks better)
This commit is contained in:
parent
db133d68d8
commit
5c747f2b41
1 changed files with 3 additions and 6 deletions
|
@ -98,12 +98,9 @@ impl Database for SqliteDatabase {
|
||||||
valid,
|
valid,
|
||||||
created,
|
created,
|
||||||
last_used,
|
last_used,
|
||||||
}| {
|
}| match valid {
|
||||||
if valid {
|
true => UserTokenEntry::Valid(UserToken::from(token), created, last_used),
|
||||||
UserTokenEntry::Valid(UserToken::from(token), created, last_used)
|
false => UserTokenEntry::Invalid(UserToken::from(token), created, last_used),
|
||||||
} else {
|
|
||||||
UserTokenEntry::Invalid(UserToken::from(token), created, last_used)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue