1
0
Fork 0
mirror of https://gitlab.com/famedly/conduit.git synced 2025-08-01 17:38:36 +00:00

refactor: all the clippy lints

This commit is contained in:
Matthias Ahouansou 2024-05-06 17:06:25 +01:00
parent 3ad7675bbf
commit 41e56baf60
No known key found for this signature in database
72 changed files with 1091 additions and 1152 deletions

View file

@ -14,14 +14,11 @@ pub 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)) {