Skip to content

Commit

Permalink
refactor(config): Be more direct
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Jul 25, 2024
1 parent 626b4f7 commit 95f556a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/typos-cli/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ impl Config {
if path.file_name().unwrap() == PYPROJECT_TOML {
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");

Ok(None)
} else {
Ok(config.tool.typos)
}
} else {
Self::from_toml(&s).map(Some)
Expand Down

0 comments on commit 95f556a

Please sign in to comment.