sstadick / rust-lapper

Rust implementation of a fast, easy, interval tree library nim-lapper
https://docs.rs/rust-lapper
MIT License
55 stars 7 forks source link

Fix a bug with merge_overlaps which caused wrong results #9

Closed thomasetter closed 3 years ago

thomasetter commented 3 years ago

The added test shows the bad behavior: when calling Lapper::merge_overlaps(), because the max_len was not updated, Lapper::find() could miss results.

This PR adds a failing test, fixes the code to make it pass, and adds a comment on how lower_bound() works because it is part of the public API, but its semantics are non-obvious.

sstadick commented 3 years ago

Hi! Thanks for the excellent PR! I'm out till later this and will try get this merged in and a new release out on Thursday.

sstadick commented 3 years ago

@thomasetter, thanks again for the PR! See release v0.5.1