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,
|
||||
created,
|
||||
last_used,
|
||||
}| {
|
||||
if valid {
|
||||
UserTokenEntry::Valid(UserToken::from(token), created, last_used)
|
||||
} else {
|
||||
UserTokenEntry::Invalid(UserToken::from(token), created, last_used)
|
||||
}
|
||||
}| match valid {
|
||||
true => UserTokenEntry::Valid(UserToken::from(token), created, last_used),
|
||||
false => UserTokenEntry::Invalid(UserToken::from(token), created, last_used),
|
||||
},
|
||||
))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue