@@ -263,7 +263,7 @@ fn use_tree_cmp_bin_search(lhs: &ast::UseTree, rhs: &ast::UseTree) -> Ordering {
263
263
( Some ( _) , None ) => Ordering :: Greater ,
264
264
( None , Some ( _) ) if !lhs_is_simple_path => Ordering :: Greater ,
265
265
( None , Some ( _) ) => Ordering :: Less ,
266
- ( Some ( ref a) , Some ( ref b) ) => path_segment_cmp ( a, b) ,
266
+ ( Some ( a) , Some ( b) ) => path_segment_cmp ( & a, & b) ,
267
267
}
268
268
}
269
269
@@ -287,15 +287,15 @@ pub(super) fn use_tree_cmp(a: &ast::UseTree, b: &ast::UseTree) -> Ordering {
287
287
( Some ( _) , None ) => Ordering :: Greater ,
288
288
( None , Some ( _) ) if !a_is_simple_path => Ordering :: Greater ,
289
289
( None , Some ( _) ) => Ordering :: Less ,
290
- ( Some ( ref a_path) , Some ( ref b_path) ) => {
290
+ ( Some ( a_path) , Some ( b_path) ) => {
291
291
// cmp_by would be useful for us here but that is currently unstable
292
292
// cmp doesn't work due the lifetimes on text's return type
293
293
a_path
294
294
. segments ( )
295
295
. zip_longest ( b_path. segments ( ) )
296
296
. find_map ( |zipped| match zipped {
297
- EitherOrBoth :: Both ( ref a_segment, ref b_segment) => {
298
- match path_segment_cmp ( a_segment, b_segment) {
297
+ EitherOrBoth :: Both ( a_segment, b_segment) => {
298
+ match path_segment_cmp ( & a_segment, & b_segment) {
299
299
Ordering :: Equal => None ,
300
300
ord => Some ( ord) ,
301
301
}
@@ -409,7 +409,7 @@ fn use_tree_cmp_by_tree_list_glob_or_alias(
409
409
. use_trees ( )
410
410
. zip_longest ( b_list. use_trees ( ) )
411
411
. find_map ( |zipped| match zipped {
412
- EitherOrBoth :: Both ( ref a_tree, ref b_tree) => match use_tree_cmp ( a_tree, b_tree) {
412
+ EitherOrBoth :: Both ( a_tree, b_tree) => match use_tree_cmp ( & a_tree, & b_tree) {
413
413
Ordering :: Equal => None ,
414
414
ord => Some ( ord) ,
415
415
} ,
0 commit comments