Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

OrdMap::range panics / includes items outside of requested range #143

Closed
theli-ua opened this issue Jul 20, 2020 · 0 comments · Fixed by #154
Closed

OrdMap::range panics / includes items outside of requested range #143

theli-ua opened this issue Jul 20, 2020 · 0 comments · Fixed by #154

Comments

@theli-ua
Copy link
Contributor

theli-ua commented Jul 20, 2020

use im::OrdMap;

fn main() {
    let mut m = OrdMap::default();
    m.insert(1, ());
    m.insert(3, ());
    assert_eq!(1, m.range(1..2).collect::<Vec<_>>().len());
}
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `1`,
 right: `2`', src/main.rs:7:5

If you specify an end beyond whats in the tree it simply panics

theli-ua added a commit to theli-ua/im-rs that referenced this issue Jul 20, 2020
@theli-ua theli-ua changed the title OrdMap::range includes items outside of requested range OrdMap::range panics / includes items outside of requested range Jul 21, 2020
bodil pushed a commit that referenced this issue Jul 27, 2020
jeffpeterson added a commit to conceptlove/db-rs that referenced this issue Aug 2, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant