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> {
864864
865865 match ( previous_overlapping, next_overlapping) {
866866 ( true , true ) => {
867- // previous: |------- |
868- // segment: |- ------|
869- // following: | -----|
867+ // previous: |------|
868+ // segment: | ------|
869+ // following: |- -----|
870870 //
871- // final: |----- ---------------|
871+ // final: | ---------------|
872872 // We merge all three segments into one, which is effectively removing one of
873873 // two previously inserted and changing the bounds on the other.
874874 let following = segments. remove ( insertion_point) ;
875875 segments[ insertion_point - 1 ] . 1 = following. 1 ;
876876 }
877877 ( true , false ) => {
878- // previous: |-----|
879- // segment: | -----|
880- // following: | -----|
878+ // previous: |------ |
879+ // segment: |- -----|
880+ // following: |- -----|
881881 //
882- // final: |---------| |-----|
882+ // final: |---------- | |- -----|
883883 // We can reuse the existing element by extending it.
884884 segments[ insertion_point - 1 ] . 1 = segment. 1 ;
885885 }
886886 ( false , true ) => {
887- // previous: |-----|
888- // segment: | -----|
889- // following: | -----|
887+ // previous: |------ |
888+ // segment: |- -----|
889+ // following: |- -----|
890890 //
891- // final: |-----| |---------|
891+ // final: |------ | |---------|
892892 // We can reuse the existing element by extending it.
893893 segments[ insertion_point] . 0 = segment. 0 ;
894894 }
895895 ( false , false ) => {
896- // previous: |-----|
897- // segment: | -----|
898- // following: | -----|
896+ // previous: |------ |
897+ // segment: |- -----|
898+ // following: |- -----|
899899 //
900- // final: |-----| |-----| |-----|
900+ // final: |------ | |------ | |- -----|
901901 segments. insert ( insertion_point, segment) ;
902902 }
903903 }
You can’t perform that action at this time.
0 commit comments