identifiers: Merge more impl blocks
This commit is contained in:
parent
79cbce00cc
commit
27a2e1f97f
@ -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.
|
||||
|
@ -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]
|
||||
|
Loading…
x
Reference in New Issue
Block a user