File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -1033,12 +1033,11 @@ fn compare_components(mut left: Components<'_>, mut right: Components<'_>) -> cm
10331033 // the middle of one
10341034 if left. prefix . is_none ( ) && right. prefix . is_none ( ) && left. front == right. front {
10351035 // possible future improvement: a [u8]::first_mismatch simd implementation
1036- let first_difference =
1037- match left. path . iter ( ) . zip ( right. path . iter ( ) ) . position ( |( & a, & b) | a != b) {
1038- None if left. path . len ( ) == right. path . len ( ) => return cmp:: Ordering :: Equal ,
1039- None => left. path . len ( ) . min ( right. path . len ( ) ) ,
1040- Some ( diff) => diff,
1041- } ;
1036+ let first_difference = match left. path . iter ( ) . zip ( right. path ) . position ( |( & a, & b) | a != b) {
1037+ None if left. path . len ( ) == right. path . len ( ) => return cmp:: Ordering :: Equal ,
1038+ None => left. path . len ( ) . min ( right. path . len ( ) ) ,
1039+ Some ( diff) => diff,
1040+ } ;
10421041
10431042 if let Some ( previous_sep) =
10441043 left. path [ ..first_difference] . iter ( ) . rposition ( |& b| left. is_sep_byte ( b) )
You can’t perform that action at this time.
0 commit comments