Skip to content

Commit

Permalink
Fixup try_fold clippy lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dsteeley committed Sep 1, 2023
1 parent 02bcf2e commit ecf7370
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/config/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ impl ExtraMetaData {
toml_dotted_bare_key_parser::parse_dotted_bare_keys(branch.as_ref())
.map_err(|e| ConfigError::WrongBranchPathOfToml(branch.clone(), e))?
.iter()
.fold(Some(root), |table, key| {
table.and_then(|v| v.get(*key).and_then(|v| v.as_table()))
.try_fold(root, |table, key| {
table.get(*key).and_then(|v| v.as_table())
})
.ok_or(ConfigError::BranchPathNotFoundInToml(branch.to_string()))
} else {
Expand Down

0 comments on commit ecf7370

Please sign in to comment.