Releases: bodil/im-rs
Releases · bodil/im-rs
15.1.0
Added
-
HashSetnow implementsFrom<Vector<A>>andFrom<&Vector<A>> where A: Clone. -
Fixed
-
Fixed a long standing crash bug in
OrdMap/OrdSet. (#154, #143, #152, #124) -
The
unionmethod on maps/sets will now prefer to mutate the larger set (which leads to less work) rather than the first set. (#163) -
Ensure
TreeFocusonly implementsSend/Syncwhen the underlying type does. (#157, #158) -
There was an issue where nodes in very large
OrdMaps could overflow when removing an element and cause a panic, which has now been fixed. (#141)
15.0.0
Changed
- Map iterators now return
(&K, &V)and(&K, &mut V)respectively, to be consistent withstd::collections's API.DiffIterforOrdMaphas also changed in the same manner. (#121)
Removed
- The
poolfeature flag has been removed from theimversion of the crate, asrefpoolno longer supports threadsafe pools. HashSet::iter_mut()has been removed, because if you modify the hashed values in a hash set, you break the hash set.
Added
- The
poolfeature flag was missing from theim-rcversion of the crate, which is the version where it's actually useful. It's been added now. DiffIternow has aDebugimplementation.- There is now a
Vector::is_inline()method to determine whether aVectoris currently inlined. (#129)
Fixed
- A smarter implementation of the sorting algorithm for
Vectorhas improved the performance ofVector::sortby approximately 2x. (#126)
14.3.0
Changed
propteststrategies have been moved toim::proptest. The previous locations of the strategies (im::vector::proptestetc) are still available, but have been deprecated.
Added
OrdSetandOrdMapnow haveget_prevandget_nextmethods (with equivalentget_prev_mutandget_next_mutmethods forOrdMap) which will return the closest key match to the requested key in the specified direction if the key isn't in the set. (#95)- The
retainmethod, inexplicably missing fromHashMapbut notHashSet, has been added. (#120) - The
get_mutmethod onOrdMapwas, equally inexplicably, private. It has now been made public.
14.2.0
[14.2.0] - 2020-01-17
Added
- Both map types now have the
get_key_value()method, corresponding to the equivalent additions to the standard library. - The
ptr_eqmethod has been added to all data types, allowing you to test whether two values refer to the same content in memory, by testing for pointer equality. (#117) HashMaphad lost itsArbitraryimplementation for thequickcheckfeature flag. It's now been restored. (#118)- Implementations for
Arbitraryfrom thearbitrarycrate have been added behind thearbitraryfeature flag.
Fixed
- Fixed a bug when reversing a consuming iterator over a
Vectorby replacing the consuming iterator with a much simpler and slightly more efficient version. (#116)
14.1.0
Added
- If you enable the
poolfeature flag, im now supports constructing data types usingrefpoolto speed up chunk allocation. The performance boost will vary between use cases and operating systems, but generally at least a 10% speedup can be expected when constructing a data type from an iterator, and the more complex an operation is, the more likely it is to benefit from being able to quickly reallocate chunks. Note that in order to use this feature, you have to construct your data types using thewith_pool(&pool)constructor, it's not enough just to enable the feature flag.
14.0.0
Changed
- As
sized-chunksnow requires a slightly more recent version ofrustcto compile, specifically version 1.36.0, so doesim. This is a breaking change, but will of course only affect your code if you're using an olderrustc.
Fixed
13.0.0
The minimum supported Rust version is now 1.34.0.
Changed
im::iter::unfoldnow gives you the owned state value rather than an immutable reference to it, which makes it a little more useful.
Removed
- The deprecated
singletonconstructors have been removed. Please useunitinstead. - The deprecated methods
Vector::chunksandVector::chunks_muthave been removed in favour ofVector::leavesandVector::leaves_mutrespectively. (#50) - The deprecated reference to
sized-chunkshas been removed. If you need it, please use thesized-chunkscrate directly. im::iter::unfold_muthas been removed, as there's no meaningful difference between it and rust-std 1.34.0'sstd::iter::from_fnwith a captured state variable.
Fixed
Vectornow usessized_chunks::InlineArrayinstead of anEmptyenum case to avoid allocation at very small sizes, letting you store a handful of elements on the stack before needing to grow into a full chunk. This has a beneficial effect on performance as well, as there's no pointer into the heap to dereference, making it faster thanstd::vec::Vecin this configuration.- Some complexity timings have been added and corrected. (#87)
OrdSet::is_subset(&self, other)now returns immediately whenselfis larger thanotherand thus could not possibly be a subset of it. (#87)
12.3.4
Changed
Cloneconstraints have been further relaxed on maps and sets, so that you can now lookup and iterate over them without requiring aCloneconstraint (though you do still needCloneto actually insert data into them to lookup or iterate over). (#81)
Fixed
12.3.3
12.3.2
Changed
Cloneconstraints on all data structures, as well as relevant constraints on maps and sets, have been relaxed where possible, so that you can now construct empty instances and call most query methods without requiring values implementCloneetc. (#63)