Rewrite some Display & Debug implementations
To delete in a more obvious way and to include debug formatting for Debug impls (i.e. enclose the string in quotes).
This commit is contained in:
parent
3959ec4abb
commit
1a87403ba2
@ -140,7 +140,7 @@ where
|
|||||||
|
|
||||||
impl fmt::Display for TagName {
|
impl fmt::Display for TagName {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
f.write_str(self.as_ref())
|
self.as_ref().fmt(f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ pub struct DeviceKeyId {
|
|||||||
|
|
||||||
impl fmt::Debug for DeviceKeyId {
|
impl fmt::Debug for DeviceKeyId {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
f.write_str(&self.full_id)
|
self.full_id.fmt(f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ pub struct EventId {
|
|||||||
|
|
||||||
impl fmt::Debug for EventId {
|
impl fmt::Debug for EventId {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
f.write_str(&self.full_id)
|
self.full_id.fmt(f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,13 +66,13 @@ impl MxcUri {
|
|||||||
|
|
||||||
impl fmt::Debug for MxcUri {
|
impl fmt::Debug for MxcUri {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
f.write_str(&self.full_uri)
|
self.full_uri.fmt(f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for MxcUri {
|
impl fmt::Display for MxcUri {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
f.write_str(&self.full_uri)
|
self.full_uri.fmt(f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ pub struct RoomAliasId {
|
|||||||
|
|
||||||
impl fmt::Debug for RoomAliasId {
|
impl fmt::Debug for RoomAliasId {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
f.write_str(&self.full_id)
|
self.full_id.fmt(f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ pub struct RoomId {
|
|||||||
|
|
||||||
impl fmt::Debug for RoomId {
|
impl fmt::Debug for RoomId {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
f.write_str(&self.full_id)
|
self.full_id.fmt(f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ pub struct RoomIdOrAliasId {
|
|||||||
|
|
||||||
impl fmt::Debug for RoomIdOrAliasId {
|
impl fmt::Debug for RoomIdOrAliasId {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
f.write_str(&self.full_id)
|
self.full_id.fmt(f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ pub struct UserId {
|
|||||||
|
|
||||||
impl fmt::Debug for UserId {
|
impl fmt::Debug for UserId {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
f.write_str(&self.full_id)
|
self.full_id.fmt(f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user