enable map_unwrap_or lint

This commit is contained in:
Charles Hall 2024-05-14 17:44:06 -07:00
parent 645d88177a
commit 224ba65d06
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
10 changed files with 81 additions and 73 deletions

View file

@ -338,8 +338,10 @@ impl Service {
.map_err(|_| Error::bad_database("Invalid push rules event in db."))
})
.transpose()?
.map(|ev: PushRulesEvent| ev.content.global)
.unwrap_or_else(|| Ruleset::server_default(user));
.map_or_else(
|| Ruleset::server_default(user),
|ev: PushRulesEvent| ev.content.global,
);
let mut highlight = false;
let mut notify = false;