Fix a bunch of clippy lints

This commit is contained in:
Jonas Platte 2021-08-31 21:20:03 +02:00
parent 364820aae4
commit a6bb9bbe68
No known key found for this signature in database
GPG key ID: CC154DE0E30B7C67
8 changed files with 77 additions and 85 deletions

View file

@ -147,7 +147,7 @@ where
let result = find_actual_destination(globals, &destination).await;
(result.0, result.1.clone().into_uri_string())
(result.0, result.1.into_uri_string())
};
let actual_destination_str = actual_destination.clone().into_https_string();
@ -1529,7 +1529,7 @@ async fn upgrade_outlier_to_timeline_pdu(
None
};
if !state_res::event_auth::auth_check(
let check_result = state_res::event_auth::auth_check(
&room_version,
&incoming_pdu,
previous_create.clone(),
@ -1543,8 +1543,9 @@ async fn upgrade_outlier_to_timeline_pdu(
.and_then(|event_id| db.rooms.get_pdu(&event_id).ok().flatten())
},
)
.map_err(|_e| "Auth check failed.".to_owned())?
{
.map_err(|_e| "Auth check failed.".to_owned())?;
if !check_result {
return Err("Event has failed auth check with state at the event.".into());
}
debug!("Auth check succeeded.");