client-api: Don't include extra field in Debug-format of login::CustomLoginInfo

This commit is contained in:
Jonas Platte 2022-10-17 15:15:44 +02:00
parent fe2d0c93e2
commit bb9742e84c
No known key found for this signature in database
GPG Key ID: AAA7A61F696C3E0C

View File

@ -323,7 +323,7 @@ pub mod v3 {
} }
#[doc(hidden)] #[doc(hidden)]
#[derive(Clone, Debug, Serialize)] #[derive(Clone, Serialize)]
#[non_exhaustive] #[non_exhaustive]
pub struct CustomLoginInfo<'a> { pub struct CustomLoginInfo<'a> {
#[serde(rename = "type")] #[serde(rename = "type")]
@ -332,8 +332,16 @@ pub mod v3 {
extra: &'a JsonObject, extra: &'a JsonObject,
} }
impl<'a> fmt::Debug for CustomLoginInfo<'a> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("CustomLoginInfo")
.field("login_type", &self.login_type)
.finish_non_exhaustive()
}
}
#[doc(hidden)] #[doc(hidden)]
#[derive(Clone, Debug, Deserialize)] #[derive(Clone, Deserialize)]
#[non_exhaustive] #[non_exhaustive]
pub struct IncomingCustomLoginInfo { pub struct IncomingCustomLoginInfo {
#[serde(rename = "type")] #[serde(rename = "type")]
@ -342,6 +350,14 @@ pub mod v3 {
extra: JsonObject, extra: JsonObject,
} }
impl fmt::Debug for IncomingCustomLoginInfo {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("IncomingCustomLoginInfo")
.field("login_type", &self.login_type)
.finish_non_exhaustive()
}
}
/// Client configuration provided by the server. /// Client configuration provided by the server.
#[derive(Clone, Debug, Deserialize, Serialize)] #[derive(Clone, Debug, Deserialize, Serialize)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]