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 @@ -864,40 +864,40 @@ impl<V: Ord + Debug> FromIterator<(Bound<V>, Bound<V>)> for Ranges<V> {
864
864
865
865
match ( previous_overlapping, next_overlapping) {
866
866
( true , true ) => {
867
- // previous: |------- |
868
- // segment: |- ------|
869
- // following: | -----|
867
+ // previous: |------|
868
+ // segment: | ------|
869
+ // following: |- -----|
870
870
//
871
- // final: |----- ---------------|
871
+ // final: | ---------------|
872
872
// We merge all three segments into one, which is effectively removing one of
873
873
// two previously inserted and changing the bounds on the other.
874
874
let following = segments. remove ( insertion_point) ;
875
875
segments[ insertion_point - 1 ] . 1 = following. 1 ;
876
876
}
877
877
( true , false ) => {
878
- // previous: |-----|
879
- // segment: | -----|
880
- // following: | -----|
878
+ // previous: |------ |
879
+ // segment: |- -----|
880
+ // following: |- -----|
881
881
//
882
- // final: |---------| |-----|
882
+ // final: |---------- | |- -----|
883
883
// We can reuse the existing element by extending it.
884
884
segments[ insertion_point - 1 ] . 1 = segment. 1 ;
885
885
}
886
886
( false , true ) => {
887
- // previous: |-----|
888
- // segment: | -----|
889
- // following: | -----|
887
+ // previous: |------ |
888
+ // segment: |- -----|
889
+ // following: |- -----|
890
890
//
891
- // final: |-----| |---------|
891
+ // final: |------ | |---------|
892
892
// We can reuse the existing element by extending it.
893
893
segments[ insertion_point] . 0 = segment. 0 ;
894
894
}
895
895
( false , false ) => {
896
- // previous: |-----|
897
- // segment: | -----|
898
- // following: | -----|
896
+ // previous: |------ |
897
+ // segment: |- -----|
898
+ // following: |- -----|
899
899
//
900
- // final: |-----| |-----| |-----|
900
+ // final: |------ | |------ | |- -----|
901
901
segments. insert ( insertion_point, segment) ;
902
902
}
903
903
}
You can’t perform that action at this time.
0 commit comments