Skip to content

Commit

Permalink
style: Remove use of map_or
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Jan 21, 2025
1 parent 9ca81fb commit f1d55e5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/bin/set-version/set_version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ fn exec(args: VersionArgs) -> CargoResult<()> {
.iter()
.filter(|p| {
LocalManifest::try_new(Path::new(&p.manifest_path))
.map_or(false, |m| m.version_is_inherited())
.map(|m| m.version_is_inherited())
.unwrap_or(false)
})
.map(|p| p.name.as_str())
.collect::<Vec<_>>();
Expand All @@ -148,7 +149,8 @@ fn exec(args: VersionArgs) -> CargoResult<()> {
.filter(|i| !selected.iter().any(|s| i.id == s.id))
.filter(|i| {
LocalManifest::try_new(Path::new(&i.manifest_path))
.map_or(false, |m| m.version_is_inherited())
.map(|m| m.version_is_inherited())
.unwrap_or(false)
})
.collect::<Vec<_>>();
let exclude_implicit = implicit
Expand Down

0 comments on commit f1d55e5

Please sign in to comment.