fix(match): fix clippy warning

This commit is contained in:
Federico Terzi 2021-12-11 17:25:18 +01:00
parent c23d99311a
commit bd2abeb8de
3 changed files with 3 additions and 18 deletions

View File

@ -40,19 +40,11 @@ impl<Id> RegexMatch<Id> {
}
}
#[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,
}

View File

@ -50,20 +50,12 @@ struct RollingMatcherStatePath<'a, Id> {
events: Vec<(Event, IsWordSeparator)>,
}
#[derive(Default)]
pub struct RollingMatcherOptions {
pub char_word_separators: Vec<String>,
pub key_word_separators: Vec<Key>,
}
impl Default for RollingMatcherOptions {
fn default() -> Self {
Self {
char_word_separators: Vec::new(),
key_word_separators: Vec::new(),
}
}
}
pub struct RollingMatcher<Id> {
char_word_separators: Vec<String>,
key_word_separators: Vec<Key>,

View File

@ -78,6 +78,7 @@ pub struct StringMatchOptions {
pub right_word: bool,
}
#[allow(clippy::derivable_impls)]
impl Default for StringMatchOptions {
fn default() -> Self {
Self {