Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make 0.20.x version compatible with funty 1.2 #141

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ All notable changes will be documented in this file.

This document is written according to the [Keep a Changelog][kac] style.

1. [0.20.3](#0203)
1. [0.20.2](#0202)
1. [0.20.1](#0201)
1. [0.20.0](#0200)
1. [Added](#added)
1. [Pointer Overhaul](#pointer-overhaul)
Expand Down Expand Up @@ -57,6 +60,22 @@ This document is written according to the [Keep a Changelog][kac] style.
1. [0.2.0](#020)
1. [0.1.0](#010)

## 0.20.3

Backports [#114].

## 0.20.2

Fixed overly vague `funty` dependency, as the `1.2` release moved `BITS` from
`bitvec` into it, but old `bitvec`s now collided. Apologies to *everyone* who
dealt with this problem after I published and *immediately* went on vacation for
two weeks!

## 0.20.1

This largely addresses defect reports. In addition, the `IterOnes` and
`IterZeros` bit-finding iterators are accelerated by specialization.

## 0.20.0

This is a major expansion of the crate’s foundation, and has a great deal of
Expand Down Expand Up @@ -1115,6 +1134,7 @@ Initial implementation and release.
[@Fotosmile]: https://github.com/Fotosmile
[@GeorgeGkas]: https://github.com/GeorgeGkas
[@ImmemorConsultrixContrarie]: https://github.com/ImmemorConsultrixContrarie
[@VilleHallivuori]: https://github.com/VilleHallivuori
[@arucil]: https://github.com/arucil
[@caelunshun]: https://github.com/caelunshun
[@geq1t]: https://github.com/geq1t
Expand Down Expand Up @@ -1149,6 +1169,7 @@ Initial implementation and release.
[Issue #69]: https://github.com/myrrlyn/bitvec/issues/69
[Issue #75]: https://github.com/myrrlyn/bitvec/issues/75
[Issue #83]: https://github.com/myrrlyn/bitvec/issues/83
[Issue #114]: https://github.com/myrrlyn/bitvec/issues/114
[Pull Request #34]: https://github.com/myrrlyn/bitvec/pull/34
[Pull Request #41]: https://github.com/myrrlyn/bitvec/pull/41
[Pull Request #68]: https://github.com/myrrlyn/bitvec/pull/68
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

[package]
name = "bitvec"
version = "0.20.0"
version = "0.20.5"
authors = [
"myrrlyn <[email protected]>",
]
Expand Down Expand Up @@ -55,7 +55,7 @@ radium = "0.6.1"
tap = "1"

[dependencies.funty]
version = "1"
version = "1.1"
default-features = false

[dependencies.serde]
Expand Down
2 changes: 1 addition & 1 deletion examples/tour.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ are dominant."
println!("{:?}", bs.domain());
println!("Show the bits in memory");
for elt in bs.domain() {
println!("{:0w$b} ", elt, w = T::Mem::BITS as usize);
println!("{:0w$b} ", elt, w = <T::Mem as BitMemory>::BITS as usize);
}
println!();
}
Expand Down
4 changes: 2 additions & 2 deletions src/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ where
let mut boxed = ManuallyDrop::new(boxed);

BitPtr::from_mut_slice(&mut boxed[..])
.span(boxed.len() * T::Mem::BITS as usize)
.span(boxed.len() * <T::Mem as BitMemory>::BITS as usize)
.map(|bitspan| Self { bitspan })
.map_err(|_| ManuallyDrop::into_inner(boxed))
}
Expand Down Expand Up @@ -438,7 +438,7 @@ where
let (_, head, bits) = bp.raw_parts();
let head = head.value() as usize;
let tail = head + bits;
let full = crate::mem::elts::<T::Mem>(tail) * T::Mem::BITS as usize;
let full = crate::mem::elts::<T::Mem>(tail) * <T::Mem as BitMemory>::BITS as usize;
unsafe {
bp.set_head(BitIdx::ZERO);
bp.set_len(full);
Expand Down
8 changes: 4 additions & 4 deletions src/domain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ macro_rules! bit_domain {
let bitspan = slice.as_bitspan();
let h = bitspan.head();
let (e, t) = h.span(bitspan.len());
let w = T::Mem::BITS;
let w = <T::Mem as BitMemory>::BITS;

match (h.value(), e, t.value()) {
(_, 0, _) => Self::empty(),
Expand All @@ -258,7 +258,7 @@ macro_rules! bit_domain {
) -> Self {
let (head, rest) = bit_domain!(split $($m)?
slice,
(T::Mem::BITS - head.value()) as usize,
(<T::Mem as BitMemory>::BITS - head.value()) as usize,
);
let (body, tail) = bit_domain!(split $($m)?
rest,
Expand Down Expand Up @@ -289,7 +289,7 @@ macro_rules! bit_domain {
) -> Self {
let (head, rest) = bit_domain!(split $($m)?
slice,
(T::Mem::BITS - head.value()) as usize,
(<T::Mem as BitMemory>::BITS - head.value()) as usize,
);
let (head, body) = (
bit_domain!(retype $($m)? head),
Expand Down Expand Up @@ -537,7 +537,7 @@ macro_rules! domain {
let head = bitspan.head();
let elts = bitspan.elements();
let tail = bitspan.tail();
let bits = T::Mem::BITS;
let bits = <T::Mem as BitMemory>::BITS;
let base = bitspan.address().to_const() as *const _;
match (head.value(), elts, tail.value()) {
(_, 0, _) => Self::empty(),
Expand Down
Loading