We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
is_ok_and
1 parent 17b65a7 commit 13a7739Copy full SHA for 13a7739
src/toolchain.rs
@@ -431,10 +431,7 @@ impl<'a> Toolchain<'a> {
431
// the environment variable itself.
432
if Path::new(&binary).file_stem() == Some("cargo".as_ref()) && path.is_absolute() {
433
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
- {
+ if fs::read_link(&cargo).is_ok_and(|p| p.file_stem() == Some("rustup".as_ref())) {
438
cmd.env("CARGO", path);
439
}
440
0 commit comments