From 176aa87c0b6cee3f86bc47ce878144e3e0ee4472 Mon Sep 17 00:00:00 2001 From: Brummel Date: Mon, 18 May 2026 16:18:34 +0200 Subject: [PATCH] refactor: derive Default for Filter (clippy) --- src/model.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/model.rs b/src/model.rs index 24e1855..e6347ee 100644 --- a/src/model.rs +++ b/src/model.rs @@ -34,7 +34,7 @@ pub struct Tags { pub exotic: bool, } -#[derive(Debug, Clone)] +#[derive(Debug, Clone, Default)] pub struct Filter { pub billable_only: bool, pub valid_only: bool, @@ -42,12 +42,6 @@ pub struct Filter { pub exclude_exotic: bool, } -impl Default for Filter { - fn default() -> Self { - Filter { billable_only: false, valid_only: false, chapters: None, exclude_exotic: false } - } -} - impl Filter { pub fn accepts(&self, t: &Tags) -> bool { if self.billable_only && !t.billable { return false; }