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
1033
1033
// the middle of one
1034
1034
if left. prefix . is_none ( ) && right. prefix . is_none ( ) && left. front == right. front {
1035
1035
// 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
+ } ;
1042
1041
1043
1042
if let Some ( previous_sep) =
1044
1043
left. path [ ..first_difference] . iter ( ) . rposition ( |& b| left. is_sep_byte ( b) )
You can’t perform that action at this time.
0 commit comments