From 7ec384c61adba9dd51b61c1c0518a313ae646bec Mon Sep 17 00:00:00 2001 From: Andy Balaam Date: Wed, 8 Jan 2025 15:10:11 +0000 Subject: [PATCH] fix: Fix incorrect debug_struct calls in several places --- crates/matrix-sdk-base/src/client.rs | 2 +- crates/matrix-sdk-base/src/sync.rs | 4 ++-- .../matrix-sdk-crypto/src/types/events/room_key_withheld.rs | 2 +- crates/matrix-sdk/src/oidc/mod.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/matrix-sdk-base/src/client.rs b/crates/matrix-sdk-base/src/client.rs index 6456d4c6c90..7c66f271f01 100644 --- a/crates/matrix-sdk-base/src/client.rs +++ b/crates/matrix-sdk-base/src/client.rs @@ -129,7 +129,7 @@ pub struct BaseClient { #[cfg(not(tarpaulin_include))] impl fmt::Debug for BaseClient { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("Client") + f.debug_struct("BaseClient") .field("session_meta", &self.store.session_meta()) .field("sync_token", &self.store.sync_token) .finish_non_exhaustive() diff --git a/crates/matrix-sdk-base/src/sync.rs b/crates/matrix-sdk-base/src/sync.rs index bc2b4751375..824becb54b2 100644 --- a/crates/matrix-sdk-base/src/sync.rs +++ b/crates/matrix-sdk-base/src/sync.rs @@ -102,7 +102,7 @@ impl RoomUpdates { #[cfg(not(tarpaulin_include))] impl fmt::Debug for RoomUpdates { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("Rooms") + f.debug_struct("RoomUpdates") .field("leave", &self.leave) .field("join", &self.join) .field("invite", &DebugInvitedRoomUpdates(&self.invite)) @@ -138,7 +138,7 @@ pub struct JoinedRoomUpdate { #[cfg(not(tarpaulin_include))] impl fmt::Debug for JoinedRoomUpdate { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("JoinedRoom") + f.debug_struct("JoinedRoomUpdate") .field("unread_notifications", &self.unread_notifications) .field("timeline", &self.timeline) .field("state", &DebugListOfRawEvents(&self.state)) diff --git a/crates/matrix-sdk-crypto/src/types/events/room_key_withheld.rs b/crates/matrix-sdk-crypto/src/types/events/room_key_withheld.rs index 61b1bd91d5c..daef8acdac2 100644 --- a/crates/matrix-sdk-crypto/src/types/events/room_key_withheld.rs +++ b/crates/matrix-sdk-crypto/src/types/events/room_key_withheld.rs @@ -264,7 +264,7 @@ pub struct NoOlmWithheldContent { #[cfg(not(tarpaulin_include))] impl std::fmt::Debug for CommonWithheldCodeContent { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - f.debug_struct("AnyWithheldContent") + f.debug_struct("CommonWithheldCodeContent") .field("room_id", &self.room_id) .field("session_id", &self.session_id) .field("sender_key", &self.sender_key) diff --git a/crates/matrix-sdk/src/oidc/mod.rs b/crates/matrix-sdk/src/oidc/mod.rs index 86f3e7f5295..5fb525d75a1 100644 --- a/crates/matrix-sdk/src/oidc/mod.rs +++ b/crates/matrix-sdk/src/oidc/mod.rs @@ -1585,7 +1585,7 @@ pub struct OidcSessionTokens { #[cfg(not(tarpaulin_include))] impl fmt::Debug for OidcSessionTokens { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("SessionTokens").finish_non_exhaustive() + f.debug_struct("OidcSessionTokens").finish_non_exhaustive() } }