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

Release 0.4.0 #197

Merged
merged 2 commits into from
Mar 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ categories = [ "algorithms", "data-structures", "science" ]
license = "MIT OR Apache-2.0"
name = "num-bigint"
repository = "https://github.com/rust-num/num-bigint"
version = "0.4.0-pre"
publish = false
version = "0.4.0"
readme = "README.md"
build = "build.rs"
exclude = ["/bors.toml", "/ci/*", "/.github/*"]
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Add this to your `Cargo.toml`:

```toml
[dependencies]
num-bigint = "0.3"
num-bigint = "0.4"
```

## Features
Expand All @@ -30,7 +30,7 @@ feature is enabled. To enable it include rand as

```toml
rand = "0.8"
num-bigint = { version = "0.3", features = ["rand"] }
num-bigint = { version = "0.4", features = ["rand"] }
```

Note that you must use the version of `rand` that `num-bigint` is compatible
Expand Down
17 changes: 17 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# Release 0.4.0 (2021-03-05)

### Breaking Changes

- Updated public dependences on [arbitrary, quickcheck][194], and [rand][185]:
- `arbitrary` support has been updated to 1.0, requiring Rust 1.40.
- `quickcheck` support has been updated to 1.0, requiring Rust 1.46.
- `rand` support has been updated to 0.8, requiring Rust 1.36.
- [`Debug` now shows plain numeric values for `BigInt` and `BigUint`][195],
rather than the raw list of internal digits.

**Contributors**: @cuviper, @Gelbpunkt

[185]: https://github.com/rust-num/num-bigint/pull/185
[194]: https://github.com/rust-num/num-bigint/pull/194
[195]: https://github.com/rust-num/num-bigint/pull/195

# Release 0.3.2 (2021-03-04)

- [The new `BigUint` methods `count_ones` and `trailing_ones`][175] return the
Expand Down
4 changes: 2 additions & 2 deletions src/bigint/bits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -517,8 +517,8 @@ pub(super) fn set_negative_bit(x: &mut BigInt, bit: u64, value: bool) {
digits[index_lo] ^= bit_mask_lo & bit_mask_hi;
} else {
digits[index_lo] = bit_mask_lo;
for index in (index_lo + 1)..index_hi {
digits[index] = big_digit::MAX;
for digit in &mut digits[index_lo + 1..index_hi] {
*digit = big_digit::MAX;
}
digits[index_hi] ^= bit_mask_hi;
}
Expand Down
11 changes: 6 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,20 @@
//! feature is enabled. To enable it include rand as
//!
//! ```toml
//! rand = "0.7"
//! num-bigint = { version = "0.3", features = ["rand"] }
//! rand = "0.8"
//! num-bigint = { version = "0.4", features = ["rand"] }
//! ```
//!
//! Note that you must use the version of `rand` that `num-bigint` is compatible
//! with: `0.7`.
//! with: `0.8`.
//!
//!
//! ## Compatibility
//!
//! The `num-bigint` crate is tested for rustc 1.31 and greater.

#![doc(html_root_url = "https://docs.rs/num-bigint/0.3")]
#![doc(html_root_url = "https://docs.rs/num-bigint/0.4")]
#![warn(rust_2018_idioms)]
#![no_std]

#[cfg(feature = "std")]
Expand Down Expand Up @@ -221,7 +222,7 @@ where

#[cfg(has_try_from)]
impl<T> fmt::Display for TryFromBigIntError<T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
self.__description().fmt(f)
}
}
Expand Down