mirror of
https://github.com/martinvonz/jj.git
synced 2024-12-31 16:40:22 +00:00
934564bf8d
I wanted to replace the BTreeMap by a Vec and noticed that we actually sometimes end up having a `0..n` range followed by a `0..0` after refinement. We currently compare those two as equal because I had not thought that we could end up attempting to add two ranges with the same start point. When trying to insert the second range (`0..0`), the BTreeMap will keep the existing key (`0..n`) and replace the value. That's probably works, but it's clearly not what I intended. Let's fix by sorting by the end point if the start point is equal. This actually improves some benchmarks by a few percent (maybe because the subsequent compaction can then remove the `0..0` range). |
||
---|---|---|
.. | ||
protos | ||
src | ||
tests | ||
build.rs | ||
Cargo.toml |