File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -359,7 +359,7 @@ impl Definitions {
359
359
360
360
#[ inline]
361
361
pub fn opt_def_index ( & self , node : ast:: NodeId ) -> Option < DefIndex > {
362
- self . node_to_def_index . get ( & node) . cloned ( )
362
+ self . node_to_def_index . get ( & node) . copied ( )
363
363
}
364
364
365
365
#[ inline]
@@ -413,7 +413,7 @@ impl Definitions {
413
413
#[ inline]
414
414
pub fn opt_span ( & self , def_id : DefId ) -> Option < Span > {
415
415
if def_id. krate == LOCAL_CRATE {
416
- self . def_index_to_span . get ( & def_id. index ) . cloned ( )
416
+ self . def_index_to_span . get ( & def_id. index ) . copied ( )
417
417
} else {
418
418
None
419
419
}
@@ -525,7 +525,7 @@ impl Definitions {
525
525
}
526
526
527
527
pub fn expansion_that_defined ( & self , index : DefIndex ) -> ExpnId {
528
- self . expansions_that_defined . get ( & index) . cloned ( ) . unwrap_or ( ExpnId :: root ( ) )
528
+ self . expansions_that_defined . get ( & index) . copied ( ) . unwrap_or ( ExpnId :: root ( ) )
529
529
}
530
530
531
531
pub fn parent_module_of_macro_def ( & self , expn_id : ExpnId ) -> DefId {
You can’t perform that action at this time.
0 commit comments