@@ -158,12 +158,12 @@ impl UseSegment {
158158 // Check if self == other with their aliases removed.
159159 fn equal_except_alias ( & self , other : & Self ) -> bool {
160160 match ( & self . kind , & other. kind ) {
161- ( UseSegmentKind :: Ident ( ref s1, _) , UseSegmentKind :: Ident ( ref s2, _) ) => s1 == s2,
161+ ( UseSegmentKind :: Ident ( s1, _) , UseSegmentKind :: Ident ( s2, _) ) => s1 == s2,
162162 ( UseSegmentKind :: Slf ( _) , UseSegmentKind :: Slf ( _) )
163163 | ( UseSegmentKind :: Super ( _) , UseSegmentKind :: Super ( _) )
164164 | ( UseSegmentKind :: Crate ( _) , UseSegmentKind :: Crate ( _) )
165165 | ( UseSegmentKind :: Glob , UseSegmentKind :: Glob ) => true ,
166- ( UseSegmentKind :: List ( ref list1) , UseSegmentKind :: List ( ref list2) ) => list1 == list2,
166+ ( UseSegmentKind :: List ( list1) , UseSegmentKind :: List ( list2) ) => list1 == list2,
167167 _ => false ,
168168 }
169169 }
@@ -591,7 +591,7 @@ impl UseTree {
591591 if aliased_self {
592592 match self . path . last_mut ( ) {
593593 Some ( UseSegment {
594- kind : UseSegmentKind :: Ident ( _, ref mut old_rename) ,
594+ kind : UseSegmentKind :: Ident ( _, old_rename) ,
595595 ..
596596 } ) => {
597597 assert ! ( old_rename. is_none( ) ) ;
@@ -667,7 +667,7 @@ impl UseTree {
667667 } ) ,
668668 )
669669 | ( None , None ) => true ,
670- ( Some ( ref a) , Some ( ref b) ) => is_same_visibility ( a, b) ,
670+ ( Some ( a) , Some ( b) ) => is_same_visibility ( a, b) ,
671671 _ => false ,
672672 }
673673 }
@@ -922,9 +922,7 @@ impl Ord for UseSegment {
922922 }
923923
924924 match ( & self . kind , & other. kind ) {
925- ( Slf ( ref a) , Slf ( ref b) )
926- | ( Super ( ref a) , Super ( ref b) )
927- | ( Crate ( ref a) , Crate ( ref b) ) => match ( a, b) {
925+ ( Slf ( a) , Slf ( b) ) | ( Super ( a) , Super ( b) ) | ( Crate ( a) , Crate ( b) ) => match ( a, b) {
928926 ( Some ( sa) , Some ( sb) ) => {
929927 if self . style_edition >= StyleEdition :: Edition2024 {
930928 version_sort ( sa. trim_start_matches ( "r#" ) , sb. trim_start_matches ( "r#" ) )
@@ -935,7 +933,7 @@ impl Ord for UseSegment {
935933 ( _, _) => a. cmp ( b) ,
936934 } ,
937935 ( Glob , Glob ) => Ordering :: Equal ,
938- ( Ident ( ref pia, ref aa) , Ident ( ref pib, ref ab) ) => {
936+ ( Ident ( pia, aa) , Ident ( pib, ab) ) => {
939937 let ( ia, ib) = if self . style_edition >= StyleEdition :: Edition2024 {
940938 ( pia. trim_start_matches ( "r#" ) , pib. trim_start_matches ( "r#" ) )
941939 } else {
@@ -977,7 +975,7 @@ impl Ord for UseSegment {
977975 ( None , None ) => Ordering :: Equal ,
978976 }
979977 }
980- ( List ( ref a) , List ( ref b) ) => {
978+ ( List ( a) , List ( b) ) => {
981979 for ( a, b) in a. iter ( ) . zip ( b. iter ( ) ) {
982980 let ord = a. cmp ( b) ;
983981 if ord != Ordering :: Equal {
0 commit comments