common: Derive Default for (Incoming)RoomNetwork
This commit is contained in:
parent
ed100afddb
commit
0a56dfb46e
@ -141,11 +141,12 @@ impl Filter<'_> {
|
||||
|
||||
/// Information about which networks/protocols from application services on the
|
||||
/// homeserver from which to request rooms.
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Incoming)]
|
||||
#[derive(Clone, Debug, Default, PartialEq, Eq, Incoming)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
#[incoming_derive(Clone, PartialEq, Eq, !Deserialize)]
|
||||
#[incoming_derive(Clone, Default, PartialEq, Eq, !Deserialize)]
|
||||
pub enum RoomNetwork<'a> {
|
||||
/// Return rooms from the Matrix network.
|
||||
#[default]
|
||||
Matrix,
|
||||
|
||||
/// Return rooms from all the networks/protocols the homeserver knows about.
|
||||
@ -155,12 +156,6 @@ pub enum RoomNetwork<'a> {
|
||||
ThirdParty(&'a str),
|
||||
}
|
||||
|
||||
impl<'a> Default for RoomNetwork<'a> {
|
||||
fn default() -> Self {
|
||||
RoomNetwork::Matrix
|
||||
}
|
||||
}
|
||||
|
||||
/// The rule used for users wishing to join a public room.
|
||||
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/doc/string_enum.md"))]
|
||||
#[derive(Clone, Debug, Default, PartialEq, Eq, StringEnum)]
|
||||
|
Loading…
x
Reference in New Issue
Block a user