Replace some then
s with some then_some
s
This commit is contained in:
parent
8751fa1a9a
commit
5bf6a46032
24 changed files with 27 additions and 26 deletions
|
@ -217,7 +217,7 @@ pub fn get_or_default_sysroot() -> Result<PathBuf, String> {
|
|||
// Look for the target rustlib directory in the suspected sysroot.
|
||||
let mut rustlib_path = rustc_target::target_rustlib_path(&p, "dummy");
|
||||
rustlib_path.pop(); // pop off the dummy target.
|
||||
rustlib_path.exists().then(|| p)
|
||||
rustlib_path.exists().then_some(p)
|
||||
}
|
||||
None => None,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue