mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 19:32:29 +00:00
Lots of clippy appeasement
This commit is contained in:
@@ -42,8 +42,8 @@ pub async fn route_addressbook_restore<AS: AddressbookStore>(
|
||||
return Ok(StatusCode::UNAUTHORIZED.into_response());
|
||||
}
|
||||
store.restore_addressbook(&owner, &addressbook_id).await?;
|
||||
Ok(match referer {
|
||||
Some(referer) => Redirect::to(&referer.to_string()).into_response(),
|
||||
None => (StatusCode::CREATED, "Restored").into_response(),
|
||||
})
|
||||
Ok(referer.map_or_else(
|
||||
|| (StatusCode::CREATED, "Restored").into_response(),
|
||||
|referer| Redirect::to(&referer.to_string()).into_response(),
|
||||
))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user