diff --git a/bin/commands/patch.rs b/bin/commands/patch.rs index 70ce42cc..95567fb0 100644 --- a/bin/commands/patch.rs +++ b/bin/commands/patch.rs @@ -111,13 +111,23 @@ impl ReviewOptions { } } -#[derive(Clone, Default, Debug, Eq, PartialEq)] +#[derive(Clone, Debug, Eq, PartialEq)] pub struct ListFilter { state: Option, authored: bool, authors: Vec, } +impl Default for ListFilter { + fn default() -> Self { + Self { + state: Some(Status::Open), + authored: false, + authors: vec![], + } + } +} + impl ListFilter { pub fn is_default(&self) -> bool { *self == ListFilter::default() @@ -146,7 +156,7 @@ impl Into for (Did, ListFilter) { let mut and = filter .state .map(|s| vec![PatchFilter::State(s)]) - .unwrap_or(vec![PatchFilter::State(Status::Open)]); + .unwrap_or(vec![]); let mut dids = filter.authored.then_some(vec![me]).unwrap_or_default(); dids.append(&mut filter.authors);