Releases: Caellian/contiguous_mem
Version 0.4.2
Version 0.4.1
Additions
- Add
ContiguousEntryRef::with_metadatafunction for manually specifyingPointeemetadata in references. - Export
static_metadatafunction - Export
ByteRangetype
Version 0.4.0
Added
- Add unsafe functions for turning entry references into pointers.
- Add
ContiguousMemoryStorage::forget.
- Add
- Add
sourcetoLockingError::WouldBlock - Add
ContiguousMemoryStorage::forgetutility method. - Add
ContiguousMemoryStorage::can_pushvariants:can_push_valuecan_push_layout
- Add persisted variants for
pushmethods which ensures values aren't overwritten when using default and concurrent implementations.
Changed
- Rename
ContiguousMemoryStorage::storetopushso it's more in line with std containers.- Update examples
- Rename
ContiguousMemoryReftoContiguousEntryRefso naming is more in line with the purpose of the struct. - Clean up
ByteRange::alignedimplementation - Fix how
AllocationTrackerprovides availableByteRanges so they're properly aligned. - Fix bugs on resizing
- Edge case where initial capacity is 0 would cause an infinite loop, now automatic resizing is smarter about how it chooses the new size.
- Clean up return types of most methods.
- Remove argument from
ContiguousMemoryStorage::can_pushto be closer toLayoutconstructor. - Rename
ContiguousMemoryStorage::new_from_layouttoContiguousMemoryStorage::new_for_layout.
Removed
- Remove
StoreDatatrait as it wasn't supposed to be used. - Remove
ContiguousMemoryStoragetrait as it only complicated implementation. - Remove deprecated re-exports.
- Remove
stdfeature.- See #fd4767d commit message for reasoning.
- Remove
preludemodule, usecontiguous_mem::*as a drop in replacement.
Management
- Add semver checking workflow
- Add clippy workflow
- Simplify CI workflow
- Add resizing test to ensure correctness is maintained across versions
- Improve documentation
0.3.1
Additions
- Added reference downcasting through
ContiguousMemoryReference::downcast_refmethod. - Added
ContiguousMemoryStorage::copy_storageutility method for unsafe implementation. - Moved
ContiguousMemoryStorage::store_dataimplementation to a sealed impl trait.- Deprecated
StoreDatatrait.
- Deprecated
Changes
- Renamed RegionBorrowed to RegionBorrowedError.
- Improved docs.
- Enabled all features for docs.rs
- Added some examples to the docs
Release issues
This minor release contains a breaking change because prelude doesn't include StoreData. I'm fairly new to maintaining a crate and I did try to avoid making removal of StoreData a breaking change, but I managed to mess it up for which I apologize. This means that if you depended on the suggested use contiguous_mem::prelude::* import and used the StoreData::store_data function you'd have to add an explicit import for contiguous_mem::StoreData.
To address this and prevent it from happening in the future, a semver check action will be added to the project.
Further, while adding an example I noticed that AllocationTracker doesn't handle alignment properly if base alignment of the container is not align_of::<usize>(). This was the case ever since the initial release. Before initial release, AllocationTracker used to keep a copy of base address and all ByteRanges were absolute which meant that such a problem didn't exist.
These issues have been fixed in v0.4.0.
0.3.0
Fixes
- Fixed concurrent implementation.
- Switched to RwLock in places where concurrent reads should be allowed.
- Fixed issues with
no_stdandstdfeatures causing the build to fail when enabled at the same time. - Fixed
debugfeature not compiling.
Additions
- Added read guards to properly handle read/write exclusion.
- Added more utility methods.
ContiguousMemoryStorage::layoutContiguousMemoryStorage::can_store
- Added a trait for common reference behavior.
Changes
- Simplified construction of references to dyn Traits (fat pointers).
- Pointer metadata is automatically inferred from previous and new type.
- Renamed
as_dynfunction intointo_dyn
- Moved reference types into
refsmodule. - Cleaned up user facing API and exported types.
- Internal state and other less important structs are no longer accessible.
- Cleaned up detail implementation inheritance chain and names.
- Added examples for each targeted use case.
- Cleaned up the documentation so it's much clearer and easier to understand.
- Added some examples to the documentation.
- Everything is documented now.
- Enabled
missing_docswarning.
- Enabled
- Enabled showing feature requirements for generated docs.
0.2.0
- Renamed some structs, traits and variants.
- Fixed storage and dropping issues.
- Fully implemented
ptr_metadatasupport. - Cleaned up type interface to be more convenient.
- Added support for mutation of stored data.
- Separated library into more modules.
- Improved tests.
0.1.2
0.1.1
Added support for ptr_metadata
This release has been yanked as it was defective:
ptr_metadatawas left enabled by default- Technically this should bump minor, but I decided to yank the release and release a new patch as the crate's been downloaded <20 times. Will take extra care this doesn't happen in future.
- The crate didn't compile without the flag due to one import not being available with
ptr_metadata.