1
0
Fork 0
mirror of https://forgejo.ellis.link/continuwuation/continuwuity.git synced 2025-10-03 18:50:45 +00:00

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
No known key found for this signature in database
9 changed files with 32 additions and 15 deletions

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()