mirror of
https://github.com/crate-ci/typos.git
synced 2024-11-22 00:51:11 -05:00
refactor: SImplify init
This commit is contained in:
parent
1e3dcef9b4
commit
8af7c47fe5
1 changed files with 5 additions and 6 deletions
11
src/main.rs
11
src/main.rs
|
@ -468,12 +468,11 @@ fn run() -> Result<i32, anyhow::Error> {
|
||||||
|
|
||||||
init_logging(args.verbose.log_level());
|
init_logging(args.verbose.log_level());
|
||||||
|
|
||||||
let mut config = config::Config::default();
|
let config = if let Some(path) = args.custom_config.as_ref() {
|
||||||
if let Some(path) = args.custom_config.as_ref() {
|
config::Config::from_file(path)?
|
||||||
let custom = config::Config::from_file(path)?;
|
} else {
|
||||||
config.update(&custom);
|
config::Config::default()
|
||||||
}
|
};
|
||||||
let config = config;
|
|
||||||
|
|
||||||
let mut typos_found = false;
|
let mut typos_found = false;
|
||||||
let mut errors_found = false;
|
let mut errors_found = false;
|
||||||
|
|
Loading…
Reference in a new issue