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.
|
/// A Matrix Error without a status code.
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
#[allow(clippy::exhaustive_structs)]
|
#[allow(clippy::exhaustive_structs)]
|
||||||
#[cfg_attr(test, derive(PartialEq))]
|
|
||||||
pub struct ErrorBody {
|
pub struct ErrorBody {
|
||||||
/// A value which can be used to handle an error message.
|
/// A value which can be used to handle an error message.
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
@ -301,12 +300,7 @@ mod tests {
|
|||||||
}))
|
}))
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
assert_eq!(
|
assert_eq!(deserialized.kind, ErrorKind::Forbidden);
|
||||||
deserialized,
|
assert_eq!(deserialized.message, "You are not authorized to ban users in this room.");
|
||||||
ErrorBody {
|
|
||||||
kind: ErrorKind::Forbidden,
|
|
||||||
message: "You are not authorized to ban users in this room.".into(),
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,8 +6,6 @@
|
|||||||
//! [client-api]: https://spec.matrix.org/v1.2/client-server-api/
|
//! [client-api]: https://spec.matrix.org/v1.2/client-server-api/
|
||||||
|
|
||||||
#![warn(missing_docs)]
|
#![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))]
|
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
||||||
|
|
||||||
pub mod account;
|
pub mod account;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user