- Features:
- Add quickcheck support, gated behind the
quickcheck
feature. - Improve performance of
RangeMap::gaps
by efficiently seeking to the start of the query range.
- Add quickcheck support, gated behind the
- Fixes:
- Relax bounds on
Default
implementation for all map and set types. RequiringK: Default
andV: Default
was accidentally introduced in v1.5.0.
- Relax bounds on
Huge thanks to xfbs, who did pretty much all the work you see in the changelog below! 💖
-
Features:
- Add
union
andintersection
methods to iterate over the union or intersection of two sets. - Add
first_range_value
andlast_range_value
methods to map types andfirst
andlast
methods to set types. - Add literal macros for all collection types — e.g.
range_set![0..100, 200..300, 400..500]
. - Implement
Default
andHash
for all collection types. - Implement
DoubleEndedIterator
for all iterators. - Implement
From<[_; N]>
(e.g.From<[Range<T>; N]> for RangeSet<T>
) for all collections. (Previously you could build a collection from an iterator, but not directly from an array.) - Implement
BitOr
andBitAnd
for set types. (Convenience wrapper around theunion
andintersection
methods mentioned above.) - Accept any
R: Borrow<Range<K>>
as argument tooverlapping
methods, allowing it to take ranges by value.
- Add
-
Changes:
- Bump minimum supported Rust version to 1.66.0 (released 2022-12-15). This is to gain access to
BTreeMap::first_key_value
andBTreeMap::last_key_value
, and for compatibility with new versions of some of rangemap's test dependencies.
- Bump minimum supported Rust version to 1.66.0 (released 2022-12-15). This is to gain access to
-
Internal:
- New benchmarks and improved test coverage.
- Changes:
- Bump minimum supported Rust version to 1.61.0 (released 2022-05-19). This is for compatibility with new versions of some of rangemap's test dependencies.
- Fixes:
- Fix
PartialEq
,PartialOrd
, andOrd
implementations forRangeMap
(andRangeSet
). These previously only compared the starts of ranges instead of the entire range. Thanks to https://github.com/hecrj for finding and fixing this!
- Fix
- Changes:
- Minimum supported Rust version for running this crate's tests has increased to 1.61.0 due to a corresponding MSRV bump in a test dependency. This is causing CI builds to fail against rustc 1.56.1, but should not affect consumers of the crate. The next minor release (1.4.0) will bump the minimum supported Rust version of rangemap itself.
- Features:
- Add
overlapping
method to all collection types, which returns an iterator over all stored entries that completely or partially overlap a given range. - Add
overlaps
convenience method to all collection types, which returns whether any stored range completely or partially overlaps a given range. - Credit to Rua for the original implementation of these new methods. (Unfortunately I couldn't use their code directly because I made other incompatible changes.) Thanks also to rumpuslabs for their engagement.
- Add
- Features:
- Add
clear
,len
, andis_empty
methods for all map and set types.
- Add
- Fixes:
- Make
const_fn
feature work again. (Previous release accidentally broke the const versions ofRangeMap::new
andRangeSet::new
.)
- Make
- Features:
- Implement
PartialEq
,Eq
,PartialOrd
, andOrd
for all map and set types. - Make
new
functions for all map and set typesconst
whenconst_fn
feature is enabled.
- Implement
- Changes:
- Bump minimum supported Rust version to 1.56.1. (Released a year ago.) This is for compatibility with new versions of some of rangemap's development dependencies.
- Fixes:
- Fix
Gaps
iterator forRangeMap
yielding an empty gap for an empty outer range. Simplified gaps logic and expanded fuzz testing to better cover this and similar cases.
- Fix
- Fixes:
- Fix empty gaps returned by
Gaps
iterator forRangeInclusiveMap
. Added fuzz tests forGaps
iterators.
- Fix empty gaps returned by
- Fixes:
- Fix empty gaps returned by
Gaps
iterator forRangeMap
, and incorrect gaps returned byGaps
iterator forRangeInclusiveMap
.
- Fix empty gaps returned by
It's time. (No functional change.)
- Features:
- Expose nameable types for iterators:
Iterator
,IntoIterator
,Gaps
(for each collection type).
- Expose nameable types for iterators:
- Changes:
- Document overflow behaviour required by implementors of
StepLite
andStepFns
.
- Document overflow behaviour required by implementors of
- Features:
- Add serde support.
- Features:
- Implement more traits for all map and set types:
IntoIter
,FromIter
, andExtend
.
- Implement more traits for all map and set types:
- Changes:
- Bump minimum supported Rust version to 1.46.
- Features:
- Support
no_std
environments.
- Support
- Changes:
- Update all dev-dependencies to latest versions.
- Fixes:
- Fix performance regression introduced in v0.1.9, which made inserts extremely slow for large maps.
- Fixes:
- Fix coalescing of contiguous ranges. In some cases
RangeMap
andRangeInclusiveMap
would leave two separate contiguous ranges with the same value instead of combining them into one.
- Fix coalescing of contiguous ranges. In some cases
- Features:
- Implement
Debug
for all map and set types.
- Implement
- Features:
- Add
gaps
method to all map and set types for iterating over sub-ranges of a given outer range that are not covered by any stored range.
- Add
- Features:
- Add
RangeInclusiveMap
andRangeInclusiveSet
types for storing closed ranges.
- Add