File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -359,7 +359,7 @@ impl Definitions {
359359
360360 #[ inline]
361361 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 ( )
363363 }
364364
365365 #[ inline]
@@ -413,7 +413,7 @@ impl Definitions {
413413 #[ inline]
414414 pub fn opt_span ( & self , def_id : DefId ) -> Option < Span > {
415415 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 ( )
417417 } else {
418418 None
419419 }
@@ -525,7 +525,7 @@ impl Definitions {
525525 }
526526
527527 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 ( ) )
529529 }
530530
531531 pub fn parent_module_of_macro_def ( & self , expn_id : ExpnId ) -> DefId {
You can’t perform that action at this time.
0 commit comments