File tree 3 files changed +9
-7
lines changed
3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -334,11 +334,8 @@ macro_rules! define_dep_nodes {
334
334
pub fn extract_def_id( & self , tcx: TyCtxt ) -> Option <DefId > {
335
335
if self . kind. can_reconstruct_query_key( ) {
336
336
let def_path_hash = DefPathHash ( self . hash) ;
337
- if let Some ( ref def_path_map) = tcx. def_path_hash_to_def_id. as_ref( ) {
338
- def_path_map. get( & def_path_hash) . cloned( )
339
- } else {
340
- None
341
- }
337
+ tcx. def_path_hash_to_def_id. as_ref( ) ?
338
+ . get( & def_path_hash) . cloned( )
342
339
} else {
343
340
None
344
341
}
Original file line number Diff line number Diff line change @@ -489,7 +489,12 @@ impl DepGraph {
489
489
}
490
490
491
491
pub ( super ) fn dep_node_debug_str ( & self , dep_node : DepNode ) -> Option < String > {
492
- self . data . as_ref ( ) . and_then ( |t| t. dep_node_debug . borrow ( ) . get ( & dep_node) . cloned ( ) )
492
+ self . data
493
+ . as_ref ( ) ?
494
+ . dep_node_debug
495
+ . borrow ( )
496
+ . get ( & dep_node)
497
+ . cloned ( )
493
498
}
494
499
495
500
pub fn edge_deduplication_data ( & self ) -> ( u64 , u64 ) {
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ impl<T: ExactSizeIterator> EnumerateAndAdjustIterator for T {
47
47
let actual_len = self . len ( ) ;
48
48
EnumerateAndAdjust {
49
49
enumerate : self . enumerate ( ) ,
50
- gap_pos : if let Some ( gap_pos) = gap_pos { gap_pos } else { expected_len } ,
50
+ gap_pos : gap_pos. unwrap_or ( expected_len) ,
51
51
gap_len : expected_len - actual_len,
52
52
}
53
53
}
You can’t perform that action at this time.
0 commit comments