mirror of
https://github.com/crate-ci/typos.git
synced 2024-11-28 12:01:06 -05:00
refactor(config): Be more direct
This commit is contained in:
parent
626b4f71db
commit
95f556a918
1 changed files with 3 additions and 3 deletions
|
@ -60,12 +60,12 @@ impl Config {
|
||||||
if path.file_name().unwrap() == PYPROJECT_TOML {
|
if path.file_name().unwrap() == PYPROJECT_TOML {
|
||||||
let config = toml::from_str::<PyprojectTomlConfig>(&s)?;
|
let config = toml::from_str::<PyprojectTomlConfig>(&s)?;
|
||||||
|
|
||||||
if config.tool.typos.is_none() {
|
if let Some(typos) = config.tool.typos {
|
||||||
|
Ok(Some(typos))
|
||||||
|
} else {
|
||||||
log::debug!("No `tool.typos` section found in `{PYPROJECT_TOML}`, skipping");
|
log::debug!("No `tool.typos` section found in `{PYPROJECT_TOML}`, skipping");
|
||||||
|
|
||||||
Ok(None)
|
Ok(None)
|
||||||
} else {
|
|
||||||
Ok(config.tool.typos)
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Self::from_toml(&s).map(Some)
|
Self::from_toml(&s).map(Some)
|
||||||
|
|
Loading…
Reference in a new issue