- added:
BumpPool
's(try_)get_with_size
and(try_)get_with_capacity
. - added:
BumpPoolGuard
'spool
field is nowpub
.
- added:
FromUtf8Error
now implementsClone
,PartialEq
,Eq
,Display
andError
.
- added: minimum capacity when growing vectors and strings (just like
Vec
) - added:
(try_)from_utf8_lossy_in
for strings - added:
(try_)from_utf16(_lossy)_in
for strings
- fixed: potential UB when using
BumpVec::splice
- added: default generic allocator parameter for
bump_vec::Splice
- added:
splice
toBumpVec
- added:
reserve_exact
to vectors and strings - added:
spare_capacity_mut
andfrom_iter(_exact)_in
to vectors
- improved: increased performance of
(Mut)BumpString::from_str_in
- added: made
owned_str
modulepub
- added: missing string methods to
BumpBox<str>
:len
,is_empty
,set_len
,retain
,clear
,as(_mut)_ptr
,remove
,as_mut_bytes
,from_utf8(_unchecked)
- deprecated:
BumpBox
'sinto_boxed_str(_unchecked)
in favor offrom_utf8(_unchecked)
- added:
Default
forFixedBumpString
- added: string methods
pop
,truncate
,retain
,drain
- added: made more
len
andis_empty
methodsconst
- added:
split_off
to suitable vector and string types - added: impl
Add<&str>
forBumpString
- added:
reserve
methods toFixedBumpString
- added: impl
Extend<char>
andExtend<&char>
for suitable string types - added: impl
Clone
forBumpVec
andBumpString
- added:
MutBumpVecRev::{ append, into_flattened, unchecked_push(_with), as_non_null_{ptr, slice} }
- fixed:
MutBumpVecRev::extend_from_within_clone
doing nothing for ZSTs - fixed: potential UB in
MutBumpVecRev::extend_from_slice_clone
when clone panics
- breaking: upgraded
zerocopy
dependency to version0.8.2
- breaking: removed deprecated methods
FixedBumpVec::{ layout, as_(mut_)boxed_slice }
,
- improved: removed a duplicate call to
shrink_to_fit
inalloc_iter
andalloc_fmt
- deprecated:
FixedBumpVec
'slayout
andas(_mut)_boxed_slice
- improved: removed a branch when doing fallible sized allocations like
try_alloc_*
(#34)
- added:
from_parts
andinto_parts
toBumpVec
andBumpString
- added:
FixedBumpString::into_string
returning aBumpString
- breaking:
BumpVec
andBumpString
now deallocate on drop, and shrink when callinginto_(boxed_)slice
- breaking:
BumpVec::into_iter
now returnsbump_vec::IntoIter
which deallocates on drop - breaking:
IntoIter
,Drain
andExtractIf
have been moved to theowned_slice
module
- added:
NoDrop
blanket impl for[T]
is more general, replacingCopy
bound withNoDrop
- added: implementation of
NoDrop
forBumpBox
,FixedBumpVec
,FixedBumpString
andBumpScope
- fixed: panic message on formatting failure to mention that, instead of a wrong "capacity overflow"
- fixed:
(try_)alloc_try_with
UB when allocating inside the provided closure, memory leak when using an unallocated bump allocator - breaking:
(try_)alloc_try_with
now requires a guaranteed allocatedBump(Scope)
- added:
(try_)alloc_try_with_mut
as an optimized version of(try_)alloc_try_with
- improved:
reset_to
now takes a&
instead of&mut
- fixed: potential UB when using
alloc_iter_mut*
orMutBump*
collections
- breaking: allow returning values from closure arguments of
scoped
,aligned
andscoped_aligned
- breaking:
(Fixed)BumpString::as_mut_vec
now return&mut
as they should instead of&
. - breaking: removed
GUARANTEED_ALLOCATED
parameter fromBumpPool(Guard)
- breaking: removed deprecated
(try_)alloc_slice_zeroed
in favor of(try_)alloc_zeroed_slice
- improved: removed a branch when bumping downwards (#25)
- fixed: UB when using a base allocator with an alignment greater than
2 * size_of::<usize>()
(#32)
- fixed:
Mut*
collections'into(_boxed)_slice
as well asalloc_iter_mut(_rev)
andalloc_fmt_mut
to not take up more than the necessary space
- added:
from_utf8_unchecked
for all string types - added:
BumpString::into_fixed_string
- added:
BumpBox<[T]>::partition
- fixed:
alloc_iter
andalloc_fmt
to not take up more than the necessary space
- fixed: Rust Analyzer breaking for other structs with a default
Global
allocator parameter
- fixed: Rust Analyzer breaking for
Bump
- added:
extend_zeroed
for vectors and strings - added:
resize_zeroed
for vectors
- deprecated:
alloc_slice_zeroed
in favor ofalloc_zeroed_slice
- added:
zerocopy
feature that addsalloc_zeroed
,alloc_slice_zeroed
andBumpBox::init_zeroed
- breaking:
BumpPool::new
is now no longer const, you can the same const constructor withBumpPool::new_in(Global)
. - breaking: you can no longer be generic over
GUARANTEED_ALLOCATED
in some ways due to theBaseAllocator
bound - added: any allocator that implements
Default
can now be used as a base allocator (before it was justGlobal
) - added:
bump
method inBumpVec
andBumpString
to return the bump allocator
- breaking: renamed
Stats::to_stats
toto_guaranteed_stats
- breaking: removed deprecated
BumpBox::into_fixed_vec
andinto_fixed_string
. - added:
impl From<GuaranteedAllocatedStats> for Stats
- added:
BumpBox::<[MaybeUninit<T>]>::init_fill_iter
- added:
BumpBox::deallocate_in
- fixed: crash in debug mode when using
alloc_iter_mut(_rev)
or callinginto_(boxed_)slice
on aMutBumpVec(Rev)
(#16) - added: optimization to not align the bump pointer when the size happens to be a multiple of
MIN_ALIGN
(#12)
- breaking: renamed
Stats
toGuaranteedAllocatedStats
- breaking: renamed
MaybeUnallocatedStats
toStats
- breaking:
stats
now always returnsStats
and is always available - breaking: renamed
into_init
andas_init(_mut)
tointo_guaranteed_allocated
andas_guaranteed_allocated(_mut)
- added:
guaranteed_allocated_stats
which returnsGuaranteedAllocatedStats
- added: make
BumpPool::new
const
- fixed: docs and changelog
- breaking: adds the
INIT
const param to signify whether the bump has an allocated chunk - added:
Bump::uninit
to create aBump
without allocation (andconst
with featurenightly-const-refs-to-static
) (#7) - breaking:
BumpVec::into_iter
returnsIntoIter<'a, T>
instead ofIntoIter<'b, T>
(#8)
- added:
serde::Serialize
implementations forBumpBox
, strings and vectors - added:
serde::DeserializeSeed
implementations for strings and vectors
- added:
BumpPool
along withBumpPoolGuard
- added: implement
Send
andSync
forBumpBox
,FixedBumpVec
andFixedBumpString
- fixed: ZST allocation with respect to
drop
,clone
anddefault
calls - fixed:
alloc_with
andalloc_slice_fill_with
not callingf
for ZSTs
- added:
BumpVec::into_fixed_vec
andFixedBumpVec::into_vec
- added: fallible
FixedBumpVec
api - added:
FixedBumpString
- added:
from_init
andfrom_uninit
forFixedBumpVec
andFixedBumpString
- deprecated:
BumpBox::into_fixed_vec
andBumpBox::into_fixed_string
- added:
String::shrink_to_fit
- fix:
aligned
andscoped_aligned
not aligning
- added:
BumpVec::shrink_to_fit
- fix: unsoundness when allocating large slices
- fix:
BumpVec
andBumpString
growing
- breaking:
BumpVec
andBumpString
now take an&Bump(Scope)
,MutBumpVec
andMutBumpString
take a&mut Bump(Scope)
(#3)
- fixed: allocating a downwards
Bump
with layout of[u8; 0]
no longer panics - change:
alloc_iter
andalloc_fmt
don't require thealloc
feature anymore