mirror of
https://github.com/crate-ci/typos.git
synced 2024-12-23 16:12:25 -05:00
refactor(config): Open door for other mutable operations
This commit is contained in:
parent
38a3007c56
commit
6729bf9f7c
1 changed files with 8 additions and 10 deletions
|
@ -149,16 +149,14 @@ impl<'s> ConfigEngine<'s> {
|
||||||
|
|
||||||
let walk = self.walk.intern(files);
|
let walk = self.walk.intern(files);
|
||||||
|
|
||||||
let types = type_
|
let mut types: std::collections::HashMap<_, _> = Default::default();
|
||||||
.into_iter()
|
for (type_name, type_engine) in type_.into_iter() {
|
||||||
.map(|(type_, type_engine)| {
|
|
||||||
let mut new_type_engine = default.clone();
|
let mut new_type_engine = default.clone();
|
||||||
new_type_engine.update(&type_engine);
|
new_type_engine.update(&type_engine);
|
||||||
new_type_engine.update(&overrides);
|
new_type_engine.update(&overrides);
|
||||||
let type_config = self.init_file_config(new_type_engine);
|
let type_config = self.init_file_config(new_type_engine);
|
||||||
(type_, type_config)
|
types.insert(type_name, type_config);
|
||||||
})
|
}
|
||||||
.collect();
|
|
||||||
default.update(&overrides);
|
default.update(&overrides);
|
||||||
let default = self.init_file_config(default);
|
let default = self.init_file_config(default);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue