Commit a1521c3 1 parent cd22820 commit a1521c3 Copy full SHA for a1521c3
File tree 4 files changed +12
-23
lines changed
4 files changed +12
-23
lines changed Original file line number Diff line number Diff line change 1
- 1.46 .0
1
+ 1.47 .0
Original file line number Diff line number Diff line change @@ -305,10 +305,7 @@ impl GitignoreStyleExcludes {
305
305
}
306
306
307
307
fn is_ignored ( & self , stat : & Stat ) -> bool {
308
- let is_dir = match stat {
309
- & Stat :: Dir ( _) => true ,
310
- _ => false ,
311
- } ;
308
+ let is_dir = matches ! ( stat, & Stat :: Dir ( _) ) ;
312
309
self . is_ignored_path ( stat. path ( ) , is_dir)
313
310
}
314
311
@@ -357,17 +354,11 @@ impl StrictGlobMatching {
357
354
}
358
355
359
356
pub fn should_check_glob_matches ( & self ) -> bool {
360
- match self {
361
- & StrictGlobMatching :: Ignore => false ,
362
- _ => true ,
363
- }
357
+ !matches ! ( self , & StrictGlobMatching :: Ignore )
364
358
}
365
359
366
360
pub fn should_throw_on_error ( & self ) -> bool {
367
- match self {
368
- & StrictGlobMatching :: Error ( _) => true ,
369
- _ => false ,
370
- }
361
+ matches ! ( self , & StrictGlobMatching :: Error ( _) )
371
362
}
372
363
}
373
364
Original file line number Diff line number Diff line change @@ -686,13 +686,9 @@ impl<N: Node> Graph<N> {
686
686
) -> Result < Vec < Generation > , N :: Error > {
687
687
let generations = {
688
688
let inner = self . inner . lock ( ) ;
689
- let dep_ids = inner
689
+ inner
690
690
. pg
691
691
. neighbors_directed ( entry_id, Direction :: Outgoing )
692
- . collect :: < Vec < _ > > ( ) ;
693
-
694
- dep_ids
695
- . into_iter ( )
696
692
. map ( |dep_id| {
697
693
let mut entry = inner
698
694
. entry_for_id ( dep_id)
Original file line number Diff line number Diff line change @@ -1015,11 +1015,13 @@ impl<R: Rule> Builder<R> {
1015
1015
to_visit. extend (
1016
1016
edge_refs
1017
1017
. iter ( )
1018
- . filter ( |edge_ref| match graph[ edge_ref. target ( ) ] . deleted_reason ( ) {
1019
- Some ( NodePrunedReason :: Ambiguous )
1020
- | Some ( NodePrunedReason :: NoSourceOfParam )
1021
- | Some ( NodePrunedReason :: NoValidCombinationsOfDependencies ) => true ,
1022
- _ => false ,
1018
+ . filter ( |edge_ref| {
1019
+ matches ! (
1020
+ graph[ edge_ref. target( ) ] . deleted_reason( ) ,
1021
+ Some ( NodePrunedReason :: Ambiguous )
1022
+ | Some ( NodePrunedReason :: NoSourceOfParam )
1023
+ | Some ( NodePrunedReason :: NoValidCombinationsOfDependencies )
1024
+ )
1023
1025
} )
1024
1026
. map ( |edge_ref| edge_ref. target ( ) ) ,
1025
1027
) ;
You can’t perform that action at this time.
0 commit comments