refactor: derive Default for Filter (clippy)

This commit is contained in:
2026-05-18 16:18:34 +02:00
parent 30799ddb0b
commit 176aa87c0b
+1 -7
View File
@@ -34,7 +34,7 @@ pub struct Tags {
pub exotic: bool, pub exotic: bool,
} }
#[derive(Debug, Clone)] #[derive(Debug, Clone, Default)]
pub struct Filter { pub struct Filter {
pub billable_only: bool, pub billable_only: bool,
pub valid_only: bool, pub valid_only: bool,
@@ -42,12 +42,6 @@ pub struct Filter {
pub exclude_exotic: bool, 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 { impl Filter {
pub fn accepts(&self, t: &Tags) -> bool { pub fn accepts(&self, t: &Tags) -> bool {
if self.billable_only && !t.billable { return false; } if self.billable_only && !t.billable { return false; }