enable manual_let_else lint

This commit is contained in:
Charles Hall 2024-05-14 17:34:43 -07:00
parent c51e87ec9a
commit 9606f59141
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
17 changed files with 165 additions and 263 deletions

View file

@ -14,14 +14,11 @@ pub(crate) async fn report_event_route(
) -> Result<report_content::v3::Response> {
let sender_user = body.sender_user.as_ref().expect("user is authenticated");
let pdu = match services().rooms.timeline.get_pdu(&body.event_id)? {
Some(pdu) => pdu,
_ => {
return Err(Error::BadRequest(
ErrorKind::InvalidParam,
"Invalid Event ID",
))
}
let Some(pdu) = services().rooms.timeline.get_pdu(&body.event_id)? else {
return Err(Error::BadRequest(
ErrorKind::InvalidParam,
"Invalid Event ID",
));
};
if let Some(true) = body.score.map(|s| s > int!(0) || s < int!(-100)) {