client-api: Rewrite small test to remove test-only PartialEq impl

This commit is contained in:
Jonas Platte 2022-06-21 18:02:16 +02:00
parent a36ea313f6
commit 61282642c0
No known key found for this signature in database
GPG Key ID: AAA7A61F696C3E0C
2 changed files with 2 additions and 10 deletions

View File

@ -219,7 +219,6 @@ impl fmt::Display for ErrorKind {
/// A Matrix Error without a status code.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[allow(clippy::exhaustive_structs)]
#[cfg_attr(test, derive(PartialEq))]
pub struct ErrorBody {
/// A value which can be used to handle an error message.
#[serde(flatten)]
@ -301,12 +300,7 @@ mod tests {
}))
.unwrap();
assert_eq!(
deserialized,
ErrorBody {
kind: ErrorKind::Forbidden,
message: "You are not authorized to ban users in this room.".into(),
}
);
assert_eq!(deserialized.kind, ErrorKind::Forbidden);
assert_eq!(deserialized.message, "You are not authorized to ban users in this room.");
}
}

View File

@ -6,8 +6,6 @@
//! [client-api]: https://spec.matrix.org/v1.2/client-server-api/
#![warn(missing_docs)]
// https://github.com/rust-lang/rust-clippy/issues/8875
#![allow(clippy::derive_partial_eq_without_eq)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
pub mod account;