diff --git a/src/config.rs b/src/config.rs index fb8ed81..7371b76 100644 --- a/src/config.rs +++ b/src/config.rs @@ -402,7 +402,7 @@ impl TryFrom for OptionalPolicy { } } -#[derive(Clone, Debug, Default, Deserialize, PartialEq)] +#[derive(Clone, Debug, Deserialize, PartialEq)] pub struct ReceiveOperation { pub error: Option, pub interface: Option, @@ -531,7 +531,7 @@ fn rules_try_from_rule_elements(value: Vec) -> Result> { pub type Rule = (Access, Operation); -#[derive(Clone, Debug, Default, Deserialize, PartialEq)] +#[derive(Clone, Debug, Deserialize, PartialEq)] pub struct SendOperation { pub broadcast: Option, pub destination: Option, @@ -845,10 +845,16 @@ mod tests { ( Access::Allow, Operation::Send(SendOperation { + broadcast: None, destination: Some(Destination::Prefix(String::from( "org.freedesktop" ))), - ..Default::default() + error: None, + interface: None, + max_fds: None, + min_fds: None, + path: None, + r#type: None }) ), // `` has nothing left after dropping eavesdrop @@ -922,12 +945,16 @@ mod tests { ( Access::Allow, Operation::Send(SendOperation { + broadcast: None, destination: Some(Destination::Name(String::from( "org.gnome.DisplayManager" ))), interface: Some(String::from("org.gnome.DisplayManager.Manager")), - // `member=... is dropped` - ..Default::default() + error: None, + max_fds: None, + min_fds: None, + path: None, + r#type: None }), ), ]),