diff --git a/espanso-match/src/regex/mod.rs b/espanso-match/src/regex/mod.rs index 560f513..b05e5ca 100644 --- a/espanso-match/src/regex/mod.rs +++ b/espanso-match/src/regex/mod.rs @@ -40,19 +40,11 @@ impl RegexMatch { } } -#[derive(Clone)] +#[derive(Clone, Default)] pub struct RegexMatcherState { buffer: String, } -impl Default for RegexMatcherState { - fn default() -> Self { - Self { - buffer: String::new(), - } - } -} - pub struct RegexMatcherOptions { pub max_buffer_size: usize, } diff --git a/espanso-match/src/rolling/matcher.rs b/espanso-match/src/rolling/matcher.rs index 136bed3..44cbd99 100644 --- a/espanso-match/src/rolling/matcher.rs +++ b/espanso-match/src/rolling/matcher.rs @@ -50,20 +50,12 @@ struct RollingMatcherStatePath<'a, Id> { events: Vec<(Event, IsWordSeparator)>, } +#[derive(Default)] pub struct RollingMatcherOptions { pub char_word_separators: Vec, pub key_word_separators: Vec, } -impl Default for RollingMatcherOptions { - fn default() -> Self { - Self { - char_word_separators: Vec::new(), - key_word_separators: Vec::new(), - } - } -} - pub struct RollingMatcher { char_word_separators: Vec, key_word_separators: Vec, diff --git a/espanso-match/src/rolling/mod.rs b/espanso-match/src/rolling/mod.rs index 57d60b7..d51fb57 100644 --- a/espanso-match/src/rolling/mod.rs +++ b/espanso-match/src/rolling/mod.rs @@ -78,6 +78,7 @@ pub struct StringMatchOptions { pub right_word: bool, } +#[allow(clippy::derivable_impls)] impl Default for StringMatchOptions { fn default() -> Self { Self {