File tree Expand file tree Collapse file tree 1 file changed +16
-16
lines changed Expand file tree Collapse file tree 1 file changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -917,40 +917,40 @@ impl<V: Ord + Debug> FromIterator<(Bound<V>, Bound<V>)> for Ranges<V> {
917
917
918
918
match ( previous_overlapping, next_overlapping) {
919
919
( true , true ) => {
920
- // previous: |------- |
921
- // segment: |- ------|
922
- // following: | -----|
920
+ // previous: |------|
921
+ // segment: | ------|
922
+ // following: |- -----|
923
923
//
924
- // final: |----- ---------------|
924
+ // final: | ---------------|
925
925
// We merge all three segments into one, which is effectively removing one of
926
926
// two previously inserted and changing the bounds on the other.
927
927
let following = segments. remove ( insertion_point) ;
928
928
segments[ insertion_point - 1 ] . 1 = following. 1 ;
929
929
}
930
930
( true , false ) => {
931
- // previous: |-----|
932
- // segment: | -----|
933
- // following: | -----|
931
+ // previous: |------ |
932
+ // segment: |- -----|
933
+ // following: |- -----|
934
934
//
935
- // final: |---------| |-----|
935
+ // final: |---------- | |- -----|
936
936
// We can reuse the existing element by extending it.
937
937
segments[ insertion_point - 1 ] . 1 = segment. 1 ;
938
938
}
939
939
( false , true ) => {
940
- // previous: |-----|
941
- // segment: | -----|
942
- // following: | -----|
940
+ // previous: |------ |
941
+ // segment: |- -----|
942
+ // following: |- -----|
943
943
//
944
- // final: |-----| |---------|
944
+ // final: |------ | |---------|
945
945
// We can reuse the existing element by extending it.
946
946
segments[ insertion_point] . 0 = segment. 0 ;
947
947
}
948
948
( false , false ) => {
949
- // previous: |-----|
950
- // segment: | -----|
951
- // following: | -----|
949
+ // previous: |------ |
950
+ // segment: |- -----|
951
+ // following: |- -----|
952
952
//
953
- // final: |-----| |-----| |-----|
953
+ // final: |------ | |------ | |- -----|
954
954
segments. insert ( insertion_point, segment) ;
955
955
}
956
956
}
You can’t perform that action at this time.
0 commit comments