client-api: Rewrite small test to remove test-only PartialEq impl
This commit is contained in:
parent
a36ea313f6
commit
61282642c0
@ -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.");
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user