File tree 3 files changed +4
-4
lines changed
3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ impl Workspace {
83
83
if doctests {
84
84
need_doctest_in_workspace = cmd ! ( config. cargo( ) , "-Z" , "help" )
85
85
. read ( )
86
- . map_or ( false , |s| s. contains ( "doctest-in-workspace" ) ) ;
86
+ . is_ok_and ( |s| s. contains ( "doctest-in-workspace" ) ) ;
87
87
}
88
88
89
89
let target_dir =
Original file line number Diff line number Diff line change @@ -155,7 +155,7 @@ impl Context {
155
155
let toolchain = sysroot. file_name ( ) . unwrap ( ) ;
156
156
if cmd ! ( "rustup" , "toolchain" , "list" )
157
157
. read ( )
158
- . map_or ( false , |t| t. contains ( toolchain) )
158
+ . is_ok_and ( |t| t. contains ( toolchain) )
159
159
{
160
160
// If toolchain is installed from rustup and llvm-tools-preview is not installed,
161
161
// suggest installing llvm-tools-preview via rustup.
Original file line number Diff line number Diff line change @@ -699,7 +699,7 @@ fn object_files(cx: &Context) -> Result<Vec<OsString>> {
699
699
let p = e. path ( ) ;
700
700
if p. is_dir ( ) {
701
701
if p. file_name ( )
702
- . map_or ( false , |f| f == "incremental" || f == ".fingerprint" || f == "out" )
702
+ . is_some_and ( |f| f == "incremental" || f == ".fingerprint" || f == "out" )
703
703
{
704
704
// Ignore incremental compilation related files and output from build scripts.
705
705
return false ;
@@ -1310,7 +1310,7 @@ fn resolve_excluded_paths(cx: &Context) -> Vec<Utf8PathBuf> {
1310
1310
for _ in WalkDir :: new ( excluded) . into_iter ( ) . filter_entry ( |e| {
1311
1311
let p = e. path ( ) ;
1312
1312
if !p. is_dir ( ) {
1313
- if p. extension ( ) . map_or ( false , |e| e == "rs" ) {
1313
+ if p. extension ( ) . is_some_and ( |e| e == "rs" ) {
1314
1314
let p = p. strip_prefix ( & cx. ws . metadata . workspace_root ) . unwrap_or ( p) ;
1315
1315
excluded_path. push ( p. to_owned ( ) . try_into ( ) . unwrap ( ) ) ;
1316
1316
}
You can’t perform that action at this time.
0 commit comments