@@ -951,7 +951,7 @@ impl LintConfiguration {
951
951
}
952
952
}
953
953
954
- let removed_selectors = removed_selectors. iter ( ) . collect :: < Vec < _ > > ( ) ;
954
+ let removed_selectors = removed_selectors. iter ( ) . sorted ( ) . collect :: < Vec < _ > > ( ) ;
955
955
match removed_selectors. as_slice ( ) {
956
956
[ ] => ( ) ,
957
957
[ selection] => {
@@ -974,7 +974,7 @@ impl LintConfiguration {
974
974
}
975
975
}
976
976
977
- for ( from, target) in redirects {
977
+ for ( from, target) in redirects. iter ( ) . sorted_by_key ( |item| item . 0 ) {
978
978
// TODO(martin): This belongs into the ruff crate.
979
979
warn_user_once_by_id ! (
980
980
from,
@@ -984,7 +984,10 @@ impl LintConfiguration {
984
984
) ;
985
985
}
986
986
987
- let deprecated_nursery_selectors = deprecated_nursery_selectors. iter ( ) . collect :: < Vec < _ > > ( ) ;
987
+ let deprecated_nursery_selectors = deprecated_nursery_selectors
988
+ . iter ( )
989
+ . sorted ( )
990
+ . collect :: < Vec < _ > > ( ) ;
988
991
match deprecated_nursery_selectors. as_slice ( ) {
989
992
[ ] => ( ) ,
990
993
[ selection] => {
@@ -1005,14 +1008,14 @@ impl LintConfiguration {
1005
1008
}
1006
1009
1007
1010
if preview. mode . is_disabled ( ) {
1008
- for selection in deprecated_selectors {
1011
+ for selection in deprecated_selectors. iter ( ) . sorted ( ) {
1009
1012
let ( prefix, code) = selection. prefix_and_code ( ) ;
1010
1013
warn_user ! (
1011
1014
"Rule `{prefix}{code}` is deprecated and will be removed in a future release." ,
1012
1015
) ;
1013
1016
}
1014
1017
} else {
1015
- let deprecated_selectors = deprecated_selectors. iter ( ) . collect :: < Vec < _ > > ( ) ;
1018
+ let deprecated_selectors = deprecated_selectors. iter ( ) . sorted ( ) . collect :: < Vec < _ > > ( ) ;
1016
1019
match deprecated_selectors. as_slice ( ) {
1017
1020
[ ] => ( ) ,
1018
1021
[ selection] => {
@@ -1033,7 +1036,7 @@ impl LintConfiguration {
1033
1036
}
1034
1037
}
1035
1038
1036
- for selection in ignored_preview_selectors {
1039
+ for selection in ignored_preview_selectors. iter ( ) . sorted ( ) {
1037
1040
let ( prefix, code) = selection. prefix_and_code ( ) ;
1038
1041
warn_user ! ( "Selection `{prefix}{code}` has no effect because preview is not enabled." , ) ;
1039
1042
}
0 commit comments