xmpp: Implement Deref<Target=ResourcePart> for RoomNick
This commit is contained in:
parent
793b76d0d5
commit
c1a3c85556
2 changed files with 10 additions and 2 deletions
|
|
@ -85,6 +85,14 @@ impl core::str::FromStr for RoomNick {
|
|||
}
|
||||
}
|
||||
|
||||
impl core::ops::Deref for RoomNick {
|
||||
type Target = ResourcePart;
|
||||
|
||||
fn deref(&self) -> &ResourcePart {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
#[test]
|
||||
|
|
|
|||
Loading…
Reference in a new issue