Skip to content

Commit d8bfe10

Browse files
committed
Bump MSRV to Rust 1.63.0
As we have done in `rust-bitcoin` bump the MSVR to Rust 1.63.0 While we are at it and so that the commit lints cleanly fix a couple of new clippy warnings: - Remove redundant import of `TryFrom` - Use `then_some` combinator
1 parent f62bdf3 commit d8bfe10

File tree

8 files changed

+11
-11
lines changed

8 files changed

+11
-11
lines changed

.github/workflows/rust.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
run: ./maintainer-tools/ci/run_task.sh nightly
5555

5656
MSRV: # 1 jobs, minimal lock file only.
57-
name: Test - 1.56.1 toolchain
57+
name: Test - 1.63.0 toolchain
5858
runs-on: ubuntu-latest
5959
strategy:
6060
fail-fast: false
@@ -71,7 +71,7 @@ jobs:
7171
- name: "Select toolchain"
7272
uses: dtolnay/rust-toolchain@stable
7373
with:
74-
toolchain: "1.56.1"
74+
toolchain: "1.63.0"
7575
- name: "Set dependencies"
7676
run: cp Cargo-${{ matrix.dep }}.lock Cargo.lock
7777
- name: "Run test script"

Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ repository = "https://github.com/rust-bitcoin/rust-miniscript/"
88
description = "Miniscript: a subset of Bitcoin Script designed for analysis"
99
keywords = [ "crypto", "bitcoin", "miniscript", "script" ]
1010
readme = "README.md"
11-
edition = "2018"
11+
edition = "2021"
12+
rust-version = "1.63.0"
1213

1314
[features]
1415
default = ["std"]

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![Build](https://github.com/rust-bitcoin/rust-miniscript/workflows/Continuous%20integration/badge.svg)
22

3-
**Minimum Supported Rust Version:** 1.56.1
3+
**Minimum Supported Rust Version:** 1.63.0
44

55
# Miniscript
66

@@ -41,7 +41,7 @@ Enabling the `no-std` feature does not disable `std`. To disable the `std` featu
4141

4242
## Minimum Supported Rust Version (MSRV)
4343

44-
This library should always compile with any combination of features on **Rust 1.56.1**.
44+
This library should always compile with any combination of features on **Rust 1.63.0**.
4545

4646
Some dependencies do not play nicely with our MSRV, if you are running the tests
4747
you may need to pin some dependencies. See `./contrib/test.sh` for current pinning.

clippy.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
msrv = "1.56.1"
1+
msrv = "1.63.0"
22
# plan API returns Self as an error type for an large-ish enum
33
large-error-threshold = 256

fuzz/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "descriptor-fuzz"
33
edition = "2021"
4-
rust-version = "1.56.1"
4+
rust-version = "1.63.0"
55
version = "0.0.1"
66
authors = ["Generated by fuzz/generate-files.sh"]
77
publish = false

fuzz/generate-files.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ cat > "$REPO_DIR/fuzz/Cargo.toml" <<EOF
1313
[package]
1414
name = "descriptor-fuzz"
1515
edition = "2021"
16-
rust-version = "1.56.1"
16+
rust-version = "1.63.0"
1717
version = "0.0.1"
1818
authors = ["Generated by fuzz/generate-files.sh"]
1919
publish = false

src/plan.rs

-1
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,6 @@ impl Plan {
289289
stack
290290
.into_iter()
291291
.fold(Builder::new(), |builder, item| {
292-
use core::convert::TryFrom;
293292
let bytes = PushBytesBuf::try_from(item)
294293
.expect("All the possible placeholders can be made into PushBytesBuf");
295294
builder.push_slice(bytes)

src/primitives/threshold.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ impl<T, const MAX: usize> Threshold<T, MAX> {
5555
/// Constructs a threshold directly from a threshold value and collection.
5656
pub fn new(k: usize, inner: Vec<T>) -> Result<Self, ThresholdError> {
5757
if k == 0 || k > inner.len() || (MAX > 0 && inner.len() > MAX) {
58-
Err(ThresholdError { k, n: inner.len(), max: (MAX > 0).then(|| MAX) })
58+
Err(ThresholdError { k, n: inner.len(), max: (MAX > 0).then_some(MAX) })
5959
} else {
6060
Ok(Threshold { k, inner })
6161
}
@@ -68,7 +68,7 @@ impl<T, const MAX: usize> Threshold<T, MAX> {
6868
// Do an early return if our minimum size exceeds the max.
6969
if MAX > 0 && min_size > MAX {
7070
let n = iter.count();
71-
return Err(ThresholdError { k, n, max: (MAX > 0).then(|| MAX) });
71+
return Err(ThresholdError { k, n, max: (MAX > 0).then_some(MAX) });
7272
}
7373

7474
let mut inner = Vec::with_capacity(min_size);

0 commit comments

Comments
 (0)