Skip to content

Commit 13a7739

Browse files
committed
Use is_ok_and helper
1 parent 17b65a7 commit 13a7739

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/toolchain.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -431,10 +431,7 @@ impl<'a> Toolchain<'a> {
431431
// the environment variable itself.
432432
if Path::new(&binary).file_stem() == Some("cargo".as_ref()) && path.is_absolute() {
433433
if let Some(cargo) = self.cfg.process.var_os("CARGO") {
434-
if fs::read_link(&cargo)
435-
.map(|p| p.file_stem() == Some("rustup".as_ref()))
436-
.unwrap_or(false)
437-
{
434+
if fs::read_link(&cargo).is_ok_and(|p| p.file_stem() == Some("rustup".as_ref())) {
438435
cmd.env("CARGO", path);
439436
}
440437
}

0 commit comments

Comments
 (0)