mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
style(hydra): Satisfy clippy's twisted and confusing demands
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user