rangemap icon indicating copy to clipboard operation
rangemap copied to clipboard

Map data structure whose keys are stored as ranges

Results 24 rangemap issues
Sort by recently updated
recently updated
newest added

Implement `get_mut()` API for `RangeMap` and `RangeInclusiveMap`, to mutate values.

Currently, on insertion there are assertions to check for invalid ranges: ```rust // RangeMap::insert assert!(range.start < range.end); ``` ```rust // RangeInclusiveMap::insert assert!( range.start() = end` (or `start > end` for...

Affects `Overlapping`, `Iter`, and `IntoIter` iterators, although since the `BTreeMap` version of `IntoIter` doesn't implement `Clone`, this just derives `Debug` for that one. Technically, they could have better-crafted `Debug` impls,...

Breaking change, but I find this kind of change necessary to interface properly with this API. Main reasons: 1. These ranges will primarily be of integers, who are `Copy` anyway....

The links to the documentation in `README.md`, as well as two intra-docs links, are currently broken and returning 404's. This PR fixes them.

Implement `entry()` API more control when inserting values.

Implement `iter_mut()` API for `RangeMap` and `RangeInclusiveMap`, to mutate values on iteration.

Is `Eq` really needed for the value type? Std maps like `HashMap` and `BTreeMap` does not pose any assumptions on the values except when implementing `PartialEq` and `Eq`, respectively.

Firstly, thank you for this crate! Secondly, a cosmetic programmer-experience improvement: The documentation clearly states that inserting an empty range into a `RangeMap` results in panic. And it is checked...

## Motivation I have a use-case where I need to be able to observe and mutate the ranges that: 1. Are the result of a split, or 2. whose size...