smol refactor
This commit is contained in:
parent
68c060cc97
commit
97a085d37e
1 changed files with 4 additions and 5 deletions
|
@ -83,9 +83,8 @@ impl Session {
|
|||
.fetch_optional(pool)
|
||||
.await?;
|
||||
|
||||
match record {
|
||||
None => Ok(None),
|
||||
Some(record) => Ok(Some((
|
||||
Ok(record.map(|record| {
|
||||
(
|
||||
Self {
|
||||
id: record.session_id,
|
||||
actor: record.session_actor,
|
||||
|
@ -105,8 +104,8 @@ impl Session {
|
|||
modified_at: record.modified_at,
|
||||
deleted_at: record.deleted_at,
|
||||
},
|
||||
))),
|
||||
}
|
||||
)
|
||||
}))
|
||||
}
|
||||
|
||||
pub async fn refresh(self, pool: &Pool<Postgres>, duration: Duration) -> Result<Self> {
|
||||
|
|
Loading…
Reference in a new issue