mirror of
https://github.com/crate-ci/typos.git
synced 2024-12-26 01:22:08 -05:00
style: Address clippy
This commit is contained in:
parent
8365351dba
commit
d51725b2a4
2 changed files with 13 additions and 6 deletions
|
@ -289,9 +289,9 @@ impl EngineConfig {
|
|||
tokenizer: Some(
|
||||
empty
|
||||
.tokenizer
|
||||
.unwrap_or_else(|| TokenizerConfig::from_defaults()),
|
||||
.unwrap_or_else(TokenizerConfig::from_defaults),
|
||||
),
|
||||
dict: Some(empty.dict.unwrap_or_else(|| DictConfig::from_defaults())),
|
||||
dict: Some(empty.dict.unwrap_or_else(DictConfig::from_defaults)),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -19,12 +19,19 @@ impl ConfigStorage {
|
|||
self.arena
|
||||
.lock()
|
||||
.unwrap()
|
||||
.alloc(kstring::KString::from_ref(other)),
|
||||
.alloc(kstring::KString::from_ref(other))
|
||||
.as_str(),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for ConfigStorage {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ConfigEngine<'s> {
|
||||
storage: &'s ConfigStorage,
|
||||
|
||||
|
@ -145,8 +152,8 @@ impl<'s> ConfigEngine<'s> {
|
|||
tokenizer, dict, ..
|
||||
} = default;
|
||||
let tokenizer_config =
|
||||
tokenizer.unwrap_or_else(|| crate::config::TokenizerConfig::from_defaults());
|
||||
let dict_config = dict.unwrap_or_else(|| crate::config::DictConfig::from_defaults());
|
||||
tokenizer.unwrap_or_else(crate::config::TokenizerConfig::from_defaults);
|
||||
let dict_config = dict.unwrap_or_else(crate::config::DictConfig::from_defaults);
|
||||
|
||||
let tokenizer = typos::tokens::TokenizerBuilder::new()
|
||||
.ignore_hex(tokenizer_config.ignore_hex())
|
||||
|
@ -177,7 +184,7 @@ impl<'s> ConfigEngine<'s> {
|
|||
files,
|
||||
check_filenames: check_filename,
|
||||
check_files: check_file,
|
||||
binary: binary,
|
||||
binary,
|
||||
tokenizer,
|
||||
dict,
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue