Skip to content

Commit 1fec852

Browse files
authored
Merge pull request #436 from cuviper/release-0.4.3
Release 0.4.3
2 parents e9c5ac8 + 43bfc6b commit 1fec852

File tree

9 files changed

+43
-63
lines changed

9 files changed

+43
-63
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ jobs:
99
strategy:
1010
matrix:
1111
rust: [
12-
1.31.0, # 2018!
13-
1.36.0, # alloc, rand
12+
1.60.0, # MSRV
1413
stable,
1514
beta,
1615
nightly
@@ -29,8 +28,8 @@ jobs:
2928
- run: ./ci/test_full.sh
3029

3130
# try a target that doesn't have std at all, but does have alloc
32-
no_std_stable:
33-
name: No Std (stable)
31+
no_std:
32+
name: No Std
3433
runs-on: ubuntu-latest
3534
steps:
3635
- uses: actions/checkout@v4
@@ -39,22 +38,6 @@ jobs:
3938
target: thumbv6m-none-eabi
4039
- run: cargo build --target thumbv6m-none-eabi --no-default-features --features "alloc libm serde rand"
4140

42-
# try a target that doesn't have std at all, nor alloc
43-
no_std_131:
44-
name: No Std (1.31.0)
45-
runs-on: ubuntu-latest
46-
steps:
47-
- uses: actions/checkout@v4
48-
- uses: actions/cache@v4
49-
with:
50-
path: ~/.cargo/registry/index
51-
key: cargo-1.31.0-git-index
52-
- uses: dtolnay/rust-toolchain@1.31.0
53-
with:
54-
target: thumbv6m-none-eabi
55-
- run: cargo generate-lockfile && cargo update -p libm --precise 0.2.5
56-
- run: cargo build --target thumbv6m-none-eabi --no-default-features --features "libm"
57-
5841
fmt:
5942
name: Format
6043
runs-on: ubuntu-latest
@@ -70,7 +53,7 @@ jobs:
7053
success:
7154
name: Success
7255
runs-on: ubuntu-latest
73-
needs: [test, no_std_131, no_std_stable, fmt]
56+
needs: [test, no_std, fmt]
7457
# Github branch protection is exceedingly silly and treats "jobs skipped because a dependency
7558
# failed" as success. So we have to do some contortions to ensure the job fails if any of its
7659
# dependencies fails.

.github/workflows/master.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
strategy:
1515
matrix:
16-
rust: [1.31.0, stable]
16+
rust: [1.60.0, stable]
1717
steps:
1818
- uses: actions/checkout@v4
1919
- uses: actions/cache@v4

.github/workflows/pr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
strategy:
1111
matrix:
12-
rust: [1.31.0, stable]
12+
rust: [1.60.0, stable]
1313
steps:
1414
- uses: actions/checkout@v4
1515
- uses: actions/cache@v4

Cargo.toml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,24 @@ categories = [ "algorithms", "data-structures", "science", "no-std" ]
88
license = "MIT OR Apache-2.0"
99
repository = "https://github.com/rust-num/num"
1010
name = "num"
11-
version = "0.4.2"
11+
version = "0.4.3"
1212
readme = "README.md"
1313
exclude = ["/ci/*", "/.github/*"]
14-
edition = "2018"
14+
edition = "2021"
15+
rust-version = "1.60"
1516

1617
[package.metadata.docs.rs]
1718
features = ["std", "serde", "rand"]
1819

19-
[badges]
20-
travis-ci = { repository = "rust-num/num" }
21-
2220
[dependencies]
2321

2422
[dependencies.num-bigint]
25-
optional = true # needs std until Rust 1.36
26-
version = "0.4.4"
23+
optional = true
24+
version = "0.4.5"
2725
default-features = false
2826

2927
[dependencies.num-complex]
30-
version = "0.4.5"
28+
version = "0.4.6"
3129
default-features = false
3230

3331
[dependencies.num-integer]
@@ -36,16 +34,16 @@ default-features = false
3634
features = ["i128"]
3735

3836
[dependencies.num-iter]
39-
version = "0.1.44"
37+
version = "0.1.45"
4038
default-features = false
4139
features = ["i128"]
4240

4341
[dependencies.num-rational]
44-
version = "0.4.1"
42+
version = "0.4.2"
4543
default-features = false
4644

4745
[dependencies.num-traits]
48-
version = "0.2.18"
46+
version = "0.2.19"
4947
default-features = false
5048
features = ["i128"]
5149

@@ -54,16 +52,18 @@ features = ["i128"]
5452
[features]
5553
default = ["std"]
5654

55+
num-bigint = ["dep:num-bigint"]
56+
5757
std = [
58-
"num-bigint/std",
58+
"dep:num-bigint", "num-bigint/std",
5959
"num-complex/std",
6060
"num-integer/std",
6161
"num-iter/std",
6262
"num-rational/std", "num-rational/num-bigint-std",
6363
"num-traits/std",
6464
]
6565

66-
alloc = ["num-bigint", "num-rational/num-bigint"]
66+
alloc = ["dep:num-bigint", "num-rational/num-bigint"]
6767

6868
libm = [
6969
"num-complex/libm",

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![crate](https://img.shields.io/crates/v/num.svg)](https://crates.io/crates/num)
44
[![documentation](https://docs.rs/num/badge.svg)](https://docs.rs/num)
5-
[![minimum rustc 1.31](https://img.shields.io/badge/rustc-1.31+-red.svg)](https://rust-lang.github.io/rfcs/2495-min-rust-version.html)
5+
[![minimum rustc 1.60](https://img.shields.io/badge/rustc-1.60+-red.svg)](https://rust-lang.github.io/rfcs/2495-min-rust-version.html)
66
[![build status](https://github.com/rust-num/num/workflows/master/badge.svg)](https://github.com/rust-num/num/actions)
77

88
A collection of numeric types and traits for Rust.
@@ -69,7 +69,7 @@ Release notes are available in [RELEASES.md](RELEASES.md).
6969

7070
## Compatibility
7171

72-
The `num` crate as a whole is tested for rustc 1.31 and greater.
72+
The `num` crate as a whole is tested for rustc 1.60 and greater.
7373

7474
The `num-traits`, `num-integer`, and `num-iter` crates are individually tested
7575
for rustc 1.8 and greater, if you require such older compatibility.

RELEASES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# Release 0.4.3 (2024-05-08)
2+
3+
- Upgrade to 2021 edition, **MSRV 1.60**.
4+
- Updated all sub-crates to their latest versions.
5+
16
# Release 0.4.2 (2024-04-12)
27

38
- Updated all sub-crates to their latest versions.

ci/rustup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
set -ex
66

77
ci=$(dirname $0)
8-
for version in 1.31.0 1.36.0 stable beta nightly; do
8+
for version in 1.60.0 stable beta nightly; do
99
rustup run "$version" "$ci/test_full.sh"
1010
done

ci/test_full.sh

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
set -e
44

55
CRATE=num
6-
MSRV=1.31
6+
MSRV=1.60
77

88
get_rust_version() {
99
local array=($(rustc --version));
@@ -27,21 +27,15 @@ if ! check_version $MSRV ; then
2727
exit 1
2828
fi
2929

30-
STD_FEATURES=(libm serde)
30+
STD_FEATURES=(libm serde rand)
31+
ALLOC_FEATURES=(libm serde rand)
3132
NO_STD_FEATURES=(libm)
32-
check_version 1.36 && STD_FEATURES+=(rand)
33-
check_version 1.36 && ALLOC_FEATURES=(libm serde rand)
3433
echo "Testing supported features: ${STD_FEATURES[*]}"
34+
echo " alloc supported features: ${ALLOC_FEATURES[*]}"
3535
echo " no_std supported features: ${NO_STD_FEATURES[*]}"
36-
if [ -n "${ALLOC_FEATURES[*]}" ]; then
37-
echo " alloc supported features: ${ALLOC_FEATURES[*]}"
38-
fi
3936

4037
cargo generate-lockfile
4138

42-
# libm 0.2.6 started using {float}::EPSILON
43-
check_version 1.43 || cargo update -p libm --precise 0.2.5
44-
4539
set -x
4640

4741
# test the default with std
@@ -74,18 +68,16 @@ cargo build --no-default-features --features="${NO_STD_FEATURES[*]}"
7468
cargo test --no-default-features --features="${NO_STD_FEATURES[*]}"
7569

7670

77-
if [ -n "${ALLOC_FEATURES[*]}" ]; then
78-
# test minimal with alloc
79-
cargo build --no-default-features --features="alloc"
80-
cargo test --no-default-features --features="alloc"
71+
# test minimal with alloc
72+
cargo build --no-default-features --features="alloc"
73+
cargo test --no-default-features --features="alloc"
8174

82-
# test each isolated feature with alloc
83-
for feature in ${ALLOC_FEATURES[*]}; do
84-
cargo build --no-default-features --features="alloc $feature"
85-
cargo test --no-default-features --features="alloc $feature"
86-
done
75+
# test each isolated feature with alloc
76+
for feature in ${ALLOC_FEATURES[*]}; do
77+
cargo build --no-default-features --features="alloc $feature"
78+
cargo test --no-default-features --features="alloc $feature"
79+
done
8780

88-
# test all supported features with alloc
89-
cargo build --no-default-features --features="alloc ${ALLOC_FEATURES[*]}"
90-
cargo test --no-default-features --features="alloc ${ALLOC_FEATURES[*]}"
91-
fi
81+
# test all supported features with alloc
82+
cargo build --no-default-features --features="alloc ${ALLOC_FEATURES[*]}"
83+
cargo test --no-default-features --features="alloc ${ALLOC_FEATURES[*]}"

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
//!
5555
//! ## Compatibility
5656
//!
57-
//! The `num` crate is tested for rustc 1.31 and greater.
57+
//! The `num` crate is tested for rustc 1.60 and greater.
5858
5959
#![doc(html_root_url = "https://docs.rs/num/0.4")]
6060
#![no_std]

0 commit comments

Comments
 (0)