resolve or_fun_call clippy lint
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
93cc98a04c
commit
cde6fdd741
7 changed files with 21 additions and 13 deletions
|
@ -86,7 +86,7 @@ pub async fn report_event_route(
|
|||
pdu.event_id,
|
||||
pdu.room_id,
|
||||
pdu.sender.to_owned(),
|
||||
body.score.unwrap_or(ruma::Int::from(0)),
|
||||
body.score.unwrap_or_else(|| ruma::Int::from(0)),
|
||||
body.reason.as_deref().unwrap_or("")
|
||||
),
|
||||
format!(
|
||||
|
@ -100,7 +100,7 @@ pub async fn report_event_route(
|
|||
pdu.event_id.to_owned(),
|
||||
pdu.room_id.to_owned(),
|
||||
pdu.sender.to_owned(),
|
||||
body.score.unwrap_or(ruma::Int::from(0)),
|
||||
body.score.unwrap_or_else(|| ruma::Int::from(0)),
|
||||
HtmlEscape(body.reason.as_deref().unwrap_or(""))
|
||||
),
|
||||
));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue