Skip to content

Commit 95f556a

Browse files
committed
refactor(config): Be more direct
1 parent 626b4f7 commit 95f556a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/typos-cli/src/config.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ impl Config {
6060
if path.file_name().unwrap() == PYPROJECT_TOML {
6161
let config = toml::from_str::<PyprojectTomlConfig>(&s)?;
6262

63-
if config.tool.typos.is_none() {
63+
if let Some(typos) = config.tool.typos {
64+
Ok(Some(typos))
65+
} else {
6466
log::debug!("No `tool.typos` section found in `{PYPROJECT_TOML}`, skipping");
6567

6668
Ok(None)
67-
} else {
68-
Ok(config.tool.typos)
6969
}
7070
} else {
7171
Self::from_toml(&s).map(Some)

0 commit comments

Comments
 (0)