From 27a2e1f97fee6262b0875e3929a44e0a8a90389b Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Thu, 23 Sep 2021 18:50:02 +0200 Subject: [PATCH] identifiers: Merge more impl blocks --- crates/ruma-identifiers/src/event_id.rs | 2 -- crates/ruma-identifiers/src/room_id.rs | 2 -- 2 files changed, 4 deletions(-) diff --git a/crates/ruma-identifiers/src/event_id.rs b/crates/ruma-identifiers/src/event_id.rs index ae42e6d2..4d24463a 100644 --- a/crates/ruma-identifiers/src/event_id.rs +++ b/crates/ruma-identifiers/src/event_id.rs @@ -65,9 +65,7 @@ impl EventId { Self { full_id, colon_idx: NonZeroU8::new(19) } } -} -impl EventId { /// Returns the event's unique ID. For the original event format as used by Matrix room /// versions 1 and 2, this is the "localpart" that precedes the homeserver. For later formats, /// this is the entire ID without the leading $ sigil. diff --git a/crates/ruma-identifiers/src/room_id.rs b/crates/ruma-identifiers/src/room_id.rs index 7b8c3a17..2ed5d2a0 100644 --- a/crates/ruma-identifiers/src/room_id.rs +++ b/crates/ruma-identifiers/src/room_id.rs @@ -43,9 +43,7 @@ impl RoomId { Self { full_id, colon_idx: NonZeroU8::new(19).unwrap() } } -} -impl RoomId { /// Returns the rooms's unique ID. pub fn localpart(&self) -> &str { &self.full_id[1..self.colon_idx.get() as usize]