Skip to content

Commit

Permalink
Don't call .ok() before unwrap_or()
Browse files Browse the repository at this point in the history
It's not necessary, and adds noise.
  • Loading branch information
Byron committed Mar 22, 2024
1 parent 8375cf4 commit f8290cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cargo/sources/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ impl<'gctx> PathSource<'gctx> {

let pkg_path = pkg.root();
let mut target_prefix;
let repo_relative_pkg_path = pkg_path.strip_prefix(root).ok().unwrap_or(Path::new(""));
let repo_relative_pkg_path = pkg_path.strip_prefix(root).unwrap_or(Path::new(""));

let pathspec = {
let mut include = gix::path::to_unix_separators_on_windows(gix::path::into_bstr(
Expand Down

0 comments on commit f8290cf

Please sign in to comment.