style(hydra): Satisfy clippy's twisted and confusing demands

This commit is contained in:
nexy7574
2025-09-02 02:34:13 +01:00
parent 4024349424
commit c2620ba57b
9 changed files with 32 additions and 15 deletions
+2 -2
View File
@@ -117,7 +117,7 @@ impl Event for Pdu {
if let Some(room_id) = &self.room_id {
room_id.clone()
} else {
let constructed_hash = "!".to_owned() + &self.event_id.as_str()[1..];
let constructed_hash = self.event_id.as_str().replace('$', "!");
RoomId::parse(&constructed_hash)
.expect("event ID can be indexed")
.to_owned()
@@ -182,7 +182,7 @@ impl Event for &Pdu {
if let Some(room_id) = &self.room_id {
room_id.clone()
} else {
let constructed_hash = "!".to_owned() + &self.event_id.as_str()[1..];
let constructed_hash = self.event_id.as_str().replace('$', "!");
RoomId::parse(&constructed_hash)
.expect("event ID can be indexed")
.to_owned()
+1
View File
@@ -153,6 +153,7 @@ pub fn auth_types_for_event(
event_id = incoming_event.event_id().as_str(),
)
)]
#[allow(clippy::suspicious_operation_groupings)]
pub async fn auth_check<E, F, Fut>(
room_version: &RoomVersion,
incoming_event: &E,