Skip to content

Commit

Permalink
Use matches! for early return
Browse files Browse the repository at this point in the history
  • Loading branch information
manzt committed Sep 26, 2024
1 parent f3b7754 commit a1ccd9a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crates/uv/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ async fn resolve_script_target(
};

// Only continue if we are absolutely certain no local file exists.
if let Ok(false) = Path::new(target).try_exists() {
} else {
if !matches!(Path::new(target).try_exists(), Ok(false)) {
return Ok(None);
}

Expand Down

0 comments on commit a1ccd9a

Please sign in to comment.