federation: Make all pub structs non_exhaustive

This commit is contained in:
Devin Ragotzy 2021-06-13 07:58:26 -04:00 committed by Jonas Platte
parent fae5385753
commit 030f23b9e9
2 changed files with 9 additions and 0 deletions

View File

@ -82,6 +82,7 @@ impl UnsignedEventContent {
}
/// Initial set of fields of `Request`.
#[allow(clippy::exhaustive_structs)]
pub struct RequestInit<'a> {
/// The room ID that the user is being invited to.
pub room_id: &'a RoomId,

View File

@ -114,4 +114,12 @@ impl Response {
/// An empty object.
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
#[allow(clippy::exhaustive_structs)]
pub struct Empty {}
impl Empty {
/// Create a new `Empty`.
pub fn new() -> Self {
Self {}
}
}