Skip to content

Commit d1e4498

Browse files
bors[bot]cuviper
andauthored
Merge #197
197: Release 0.4.0 r=cuviper a=cuviper Co-authored-by: Josh Stone <cuviper@gmail.com>
2 parents 7c40fde + 4b7c9d7 commit d1e4498

File tree

5 files changed

+28
-11
lines changed

5 files changed

+28
-11
lines changed

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ categories = [ "algorithms", "data-structures", "science" ]
88
license = "MIT OR Apache-2.0"
99
name = "num-bigint"
1010
repository = "https://github.com/rust-num/num-bigint"
11-
version = "0.4.0-pre"
12-
publish = false
11+
version = "0.4.0"
1312
readme = "README.md"
1413
build = "build.rs"
1514
exclude = ["/bors.toml", "/ci/*", "/.github/*"]

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Add this to your `Cargo.toml`:
1313

1414
```toml
1515
[dependencies]
16-
num-bigint = "0.3"
16+
num-bigint = "0.4"
1717
```
1818

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

3131
```toml
3232
rand = "0.8"
33-
num-bigint = { version = "0.3", features = ["rand"] }
33+
num-bigint = { version = "0.4", features = ["rand"] }
3434
```
3535

3636
Note that you must use the version of `rand` that `num-bigint` is compatible

RELEASES.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
# Release 0.4.0 (2021-03-05)
2+
3+
### Breaking Changes
4+
5+
- Updated public dependences on [arbitrary, quickcheck][194], and [rand][185]:
6+
- `arbitrary` support has been updated to 1.0, requiring Rust 1.40.
7+
- `quickcheck` support has been updated to 1.0, requiring Rust 1.46.
8+
- `rand` support has been updated to 0.8, requiring Rust 1.36.
9+
- [`Debug` now shows plain numeric values for `BigInt` and `BigUint`][195],
10+
rather than the raw list of internal digits.
11+
12+
**Contributors**: @cuviper, @Gelbpunkt
13+
14+
[185]: https://github.com/rust-num/num-bigint/pull/185
15+
[194]: https://github.com/rust-num/num-bigint/pull/194
16+
[195]: https://github.com/rust-num/num-bigint/pull/195
17+
118
# Release 0.3.2 (2021-03-04)
219

320
- [The new `BigUint` methods `count_ones` and `trailing_ones`][175] return the

src/bigint/bits.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,8 +517,8 @@ pub(super) fn set_negative_bit(x: &mut BigInt, bit: u64, value: bool) {
517517
digits[index_lo] ^= bit_mask_lo & bit_mask_hi;
518518
} else {
519519
digits[index_lo] = bit_mask_lo;
520-
for index in (index_lo + 1)..index_hi {
521-
digits[index] = big_digit::MAX;
520+
for digit in &mut digits[index_lo + 1..index_hi] {
521+
*digit = big_digit::MAX;
522522
}
523523
digits[index_hi] ^= bit_mask_hi;
524524
}

src/lib.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,19 +72,20 @@
7272
//! feature is enabled. To enable it include rand as
7373
//!
7474
//! ```toml
75-
//! rand = "0.7"
76-
//! num-bigint = { version = "0.3", features = ["rand"] }
75+
//! rand = "0.8"
76+
//! num-bigint = { version = "0.4", features = ["rand"] }
7777
//! ```
7878
//!
7979
//! Note that you must use the version of `rand` that `num-bigint` is compatible
80-
//! with: `0.7`.
80+
//! with: `0.8`.
8181
//!
8282
//!
8383
//! ## Compatibility
8484
//!
8585
//! The `num-bigint` crate is tested for rustc 1.31 and greater.
8686
87-
#![doc(html_root_url = "https://docs.rs/num-bigint/0.3")]
87+
#![doc(html_root_url = "https://docs.rs/num-bigint/0.4")]
88+
#![warn(rust_2018_idioms)]
8889
#![no_std]
8990

9091
#[cfg(feature = "std")]
@@ -221,7 +222,7 @@ where
221222

222223
#[cfg(has_try_from)]
223224
impl<T> fmt::Display for TryFromBigIntError<T> {
224-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
225+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
225226
self.__description().fmt(f)
226227
}
227228
}

0 commit comments

Comments
 (0)