From 06dd85bc28d0e81e6b1d4b89c5f2df3af25c2a60 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sun, 10 Nov 2019 11:05:50 +0100 Subject: Use Default implementation for constructing Signed-off-by: Matthias Beyer --- bin/domain/imag-todo/src/lib.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/bin/domain/imag-todo/src/lib.rs b/bin/domain/imag-todo/src/lib.rs index 9f22c749..96ff913f 100644 --- a/bin/domain/imag-todo/src/lib.rs +++ b/bin/domain/imag-todo/src/lib.rs @@ -147,7 +147,7 @@ impl ImagApplication for ImagTodo { /// The blacklist is checked first, followed by the whitelist. /// In case the whitelist is empty, the StatusMatcher works with a /// blacklist-only approach. -#[derive(Debug)] +#[derive(Debug, Default)] pub struct StatusMatcher { is: Vec, is_not: Vec, @@ -155,10 +155,7 @@ pub struct StatusMatcher { impl StatusMatcher { pub fn new() -> Self { - StatusMatcher { - is: Vec::new(), - is_not: Vec::new(), - } + StatusMatcher { ..Default::default() } } pub fn is(mut self, s: Status) -> Self { -- cgit v1.2.3