Releases: Caellian/contiguous_mem
Version 0.4.2
Version 0.4.1
Additions
- Add
ContiguousEntryRef::with_metadata
function for manually specifyingPointee
metadata in references. - Export
static_metadata
function - Export
ByteRange
type
Version 0.4.0
Added
- Add unsafe functions for turning entry references into pointers.
- Add
ContiguousMemoryStorage::forget
.
- Add
- Add
source
toLockingError::WouldBlock
- Add
ContiguousMemoryStorage::forget
utility method. - Add
ContiguousMemoryStorage::can_push
variants:can_push_value
can_push_layout
- Add persisted variants for
push
methods which ensures values aren't overwritten when using default and concurrent implementations.
Changed
- Rename
ContiguousMemoryStorage::store
topush
so it's more in line with std containers.- Update examples
- Rename
ContiguousMemoryRef
toContiguousEntryRef
so naming is more in line with the purpose of the struct. - Clean up
ByteRange::aligned
implementation - Fix how
AllocationTracker
provides availableByteRange
s 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_push
to be closer toLayout
constructor. - Rename
ContiguousMemoryStorage::new_from_layout
toContiguousMemoryStorage::new_for_layout
.
Removed
- Remove
StoreData
trait as it wasn't supposed to be used. - Remove
ContiguousMemoryStorage
trait as it only complicated implementation. - Remove deprecated re-exports.
- Remove
std
feature.- See #fd4767d commit message for reasoning.
- Remove
prelude
module, 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_ref
method. - Added
ContiguousMemoryStorage::copy_storage
utility method for unsafe implementation. - Moved
ContiguousMemoryStorage::store_data
implementation to a sealed impl trait.- Deprecated
StoreData
trait.
- 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 ByteRange
s 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_std
andstd
features causing the build to fail when enabled at the same time. - Fixed
debug
feature not compiling.
Additions
- Added read guards to properly handle read/write exclusion.
- Added more utility methods.
ContiguousMemoryStorage::layout
ContiguousMemoryStorage::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_dyn
function intointo_dyn
- Moved reference types into
refs
module. - 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_docs
warning.
- 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_metadata
support. - 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_metadata
was 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
.