From bc8039d3cc12e5acdaf20b729cbf046ddd298b4f Mon Sep 17 00:00:00 2001 From: Erik Kundt Date: Thu, 29 Feb 2024 12:53:37 +0100 Subject: [PATCH] lib: Change patch filter default to 'open' --- src/common/cob/patch.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/common/cob/patch.rs b/src/common/cob/patch.rs index f17e8454..079b9de7 100644 --- a/src/common/cob/patch.rs +++ b/src/common/cob/patch.rs @@ -31,13 +31,23 @@ impl Display for State { } } -#[derive(Clone, Default, Debug, Eq, PartialEq)] +#[derive(Clone, Debug, Eq, PartialEq)] pub struct Filter { state: Option, authored: bool, authors: Vec, } +impl Default for Filter { + fn default() -> Self { + Self { + state: Some(State::default()), + authored: false, + authors: vec![], + } + } +} + impl Filter { pub fn with_state(mut self, state: Option) -> Self { self.state = state;