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:
parent
4024349424
commit
c2620ba57b
9 changed files with 32 additions and 15 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue