All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Checks invariants after deserialization. (Thanks, @Mrmaxmeier!)
- Oldest supported rustc version is now 1.31.0.
BitVec::get
takes&self
, not&mut self
.
- Oldest supported rustc version is now 1.24.0.
BitsMutExt
extension trait with methodsbit_assign
,bit_zip_assign
,bit_and_assign
,bit_or_assign
, andbit_xor_assign
.BitSliceableMut
helper trait with one method,bit_slice_mut
. This trait is automatically implemented for allBitSliceable
types that slice to aBitsMut
type. Callingbit_slice_mut
forces auto-ref to choose such a type.Bits::get_raw_block
method, which may return spurious bits in the last block of a bit vector. This enables some fast paths where we don't mind the spurious bits.From<Box<[Block]>>
andFrom<Vec<Block>>
impls forBitVec<Block>
.
Bits
is now a super trait ofBitSliceable<R>
, and the block type of the slice matches the block type ofSelf
.- The function passed to
BitsExt::bit_zip
no longer takes a third,usize
argument.
BlockType::last_block_bits
in favor ofBlockType::block_bits
.- Alias of trait
BitsExt
is moved in theadapter
module. (Deprecated in 0.8.1.)
- Impls of
Bits
andBitsMut
forVec<Block>
. The impls for[Block]
already caught most causes because of autoderef, but this is helpful when you want to pass aVec
to a generic method.
BitSlice::from_raw_parts
andBitSliceMut::from_raw_parts
now take an offset of typeu64
rather thanu8
, and the offset doesn't have to be less than the block size.- Removed 12
BitSliceable
impls for array slices with two blanket impls. I don't believe this is a breaking change.
- Single-bit
BitVec
operations are significantly faster now.
- Bit-slicing
&[bool]
and&mut [bool]
usingBitSliceable
now requiresu64
ranges rather thanusize
ranges. Now allBitSliceable
instances useu64
ranges.
- Empty
BitVec
does not allocate.
BitsExt::bit_zip
method generalizesbit_and
,bit_or
, etc.BlockType::block_bits
static method, for finding out the number of bits in the block at the given position.
- Trait
BitsExt
is moved from theadapter
module to the root. (There's still apub use
for it inadapter
, but that alias is deprecated and will be removed in 0.10.0.)
- Performance problem with
BitVec::block_reserve
, which was growing way too much.
adapter
module, including:BitsExt
trait, for adapter operations over types that implementBits
. Methods include:- bit-wise logic:
bit_not
,bit_and
,bit_or
, andbit_xor
; bit_concat
andbit_pad
.
- bit-wise logic:
- constant adapter
BitFill
; BoolAdapter
for adapting unpackedVec<bool>
or&[bool]
; and- slicing adapter
BitSliceAdapter
. (Note thatBitSliceAdapter
does not replace the more specializedBitSlice
.)
Bits::to_bit_vec
method, which copies the bits of aBits
into a newBitVec
.bit_vec!
macro allows trailing comma.BitVec::get
andBitVec::set
methods, aliasingBits::get_bit
andBitsMut::set_bit
, respectively.From
impls for converting array slices toBitSlice
, mutable array slices toBitSliceMut
, andBitSliceMut
toBitSlice
.Bits
,BitsMut
, andBitSliceable
impls for sized arrays from sizes 0 to 31.
BitSliceMut::as_immut
renamed toBitSliceMut::as_bit_slice
.
Bits::bit_offset
method. Blocks returned from aBits
instance are now assumed to be aligned. This makesBitSlice
more complicated but significantly simplifies everything else and removes some infelicities.BitSliceBlockIter
struct and methods for creating it. I'm rethinking how iteration over bit vectors and bit-vector-likes should work.
- A good number of doc examples.
html_doc_root
for cross-linking of docs.
- Documentation, in many places.
- Renamed about half the types in the library. Doing this while it
has no users! Changes are:
- structures
BitVec{,Mut,Push}
->Bits{,Mut,Push}
- structure
Bv
->BitVec
- module
bv
->bit_vec
- macro
bv!
->bit_vec!
- structures
- Support for inclusive ranges.
- Optional
serde
support, via Cargo feature"serde"
.
- Cargo feature
"u128"
, asu128
support is now detected.
- Support for
u128
is now detected. - No longer depends on
num-traits
crate.
- Support for
u128
, enabled by Cargo feature"u128"
. - Version support statement: rustc 1.20.0.
- Documentation URL.
- Version number in example toml.
- Impl of
Default
forBV
. - Methods
BitSlice::is_empty
andBitSliceMut::is_empty
.
- Lots of tests.
- Added a necessary lifetime parameter.
BV::align_block
andBV::resize
.
- Impl
BitSliceable
for[bool]
andVec<bool>
.
- Renamed method
BitSliceable::slice
toBitSliceable::bit_slice
.
- More tests.
- Bug in
block_len
method.
bv!
macro.BitSlice::len
andBitSliceMut::len
methods.BV::resize
method.
- impl
BitVec
andBitVecMut
for[bool]
.
- Documentation.
- Better crate summary in README.
- Documentation on bit slice representation.
- Crate metadata.
Initial release.