Skip to content

Commit

Permalink
Merge #719: Bump the MSRV
Browse files Browse the repository at this point in the history
c95b411 CI: Run MSRV job with both lock files (Tobin C. Harding)
d8bfe10 Bump MSRV to Rust 1.63.0 (Tobin C. Harding)
f62bdf3 fuzz: Upgrade hongfuzz patch version (Tobin C. Harding)

Pull request description:

  As we have done in `rust-bitcoin` bump the MSVR to Rust 1.63.0

  Also, run the MSRV CI job with both lockfiles (which are currently different).

ACKs for top commit:
  apoelstra:
    ACK c95b411 successfully ran local tests; glad I got #712 in first so I could do the release!

Tree-SHA512: b3ae9583f10ac2d01353736fe68a37bc0fff6774e4ea935b4fbf16bdb3cb033b4c281b8cb45d9e6ead343d2b7033d042190369cbe21b953ac392d19ff564cf1a
  • Loading branch information
apoelstra committed Aug 7, 2024
2 parents 8f54b5e + c95b411 commit a6e897f
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 22 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ jobs:
- name: "Run test script"
run: ./maintainer-tools/ci/run_task.sh nightly

MSRV: # 1 jobs, minimal lock file only.
name: Test - 1.56.1 toolchain
MSRV: # 2 jobs, one per lock file.
name: Test - 1.63.0 toolchain
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
dep: [minimal]
dep: [minimal, recent]
steps:
- name: "Checkout repo"
uses: actions/checkout@v4
Expand All @@ -71,7 +71,7 @@ jobs:
- name: "Select toolchain"
uses: dtolnay/rust-toolchain@stable
with:
toolchain: "1.56.1"
toolchain: "1.63.0"
- name: "Set dependencies"
run: cp Cargo-${{ matrix.dep }}.lock Cargo.lock
- name: "Run test script"
Expand Down
8 changes: 4 additions & 4 deletions Cargo-minimal.lock
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,9 @@ checksum = "3011d1213f159867b13cfd6ac92d2cd5f1345762c63be3554e84092d85a50bbd"

[[package]]
name = "honggfuzz"
version = "0.5.55"
version = "0.5.56"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "848e9c511092e0daa0a35a63e8e6e475a3e8f870741448b9f6028d69b142f18e"
checksum = "7c76b6234c13c9ea73946d1379d33186151148e0da231506b964b44f3d023505"
dependencies = [
"lazy_static",
"memmap2",
Expand Down Expand Up @@ -307,9 +307,9 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"

[[package]]
name = "memmap2"
version = "0.5.10"
version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327"
checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322"
dependencies = [
"libc",
]
Expand Down
8 changes: 4 additions & 4 deletions Cargo-recent.lock
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,9 @@ checksum = "3011d1213f159867b13cfd6ac92d2cd5f1345762c63be3554e84092d85a50bbd"

[[package]]
name = "honggfuzz"
version = "0.5.55"
version = "0.5.56"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "848e9c511092e0daa0a35a63e8e6e475a3e8f870741448b9f6028d69b142f18e"
checksum = "7c76b6234c13c9ea73946d1379d33186151148e0da231506b964b44f3d023505"
dependencies = [
"lazy_static",
"memmap2",
Expand Down Expand Up @@ -285,9 +285,9 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"

[[package]]
name = "memmap2"
version = "0.5.10"
version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327"
checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322"
dependencies = [
"libc",
]
Expand Down
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ repository = "https://github.com/rust-bitcoin/rust-miniscript/"
description = "Miniscript: a subset of Bitcoin Script designed for analysis"
keywords = [ "crypto", "bitcoin", "miniscript", "script" ]
readme = "README.md"
edition = "2018"
edition = "2021"
rust-version = "1.63.0"

[features]
default = ["std"]
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![Build](https://github.com/rust-bitcoin/rust-miniscript/workflows/Continuous%20integration/badge.svg)

**Minimum Supported Rust Version:** 1.56.1
**Minimum Supported Rust Version:** 1.63.0

# Miniscript

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

## Minimum Supported Rust Version (MSRV)

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

Some dependencies do not play nicely with our MSRV, if you are running the tests
you may need to pin some dependencies. See `./contrib/test.sh` for current pinning.
Expand Down
2 changes: 1 addition & 1 deletion clippy.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
msrv = "1.56.1"
msrv = "1.63.0"
# plan API returns Self as an error type for an large-ish enum
large-error-threshold = 256
4 changes: 2 additions & 2 deletions fuzz/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "descriptor-fuzz"
edition = "2021"
rust-version = "1.56.1"
rust-version = "1.63.0"
version = "0.0.1"
authors = ["Generated by fuzz/generate-files.sh"]
publish = false
Expand All @@ -10,7 +10,7 @@ publish = false
cargo-fuzz = true

[dependencies]
honggfuzz = { version = "0.5.55", default-features = false }
honggfuzz = { version = "0.5.56", default-features = false }
miniscript = { path = "..", features = [ "compiler" ] }

regex = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion fuzz/generate-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ cat > "$REPO_DIR/fuzz/Cargo.toml" <<EOF
[package]
name = "descriptor-fuzz"
edition = "2021"
rust-version = "1.56.1"
rust-version = "1.63.0"
version = "0.0.1"
authors = ["Generated by fuzz/generate-files.sh"]
publish = false
Expand Down
1 change: 0 additions & 1 deletion src/plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,6 @@ impl Plan {
stack
.into_iter()
.fold(Builder::new(), |builder, item| {
use core::convert::TryFrom;
let bytes = PushBytesBuf::try_from(item)
.expect("All the possible placeholders can be made into PushBytesBuf");
builder.push_slice(bytes)
Expand Down
4 changes: 2 additions & 2 deletions src/primitives/threshold.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ impl<T, const MAX: usize> Threshold<T, MAX> {
/// Constructs a threshold directly from a threshold value and collection.
pub fn new(k: usize, inner: Vec<T>) -> Result<Self, ThresholdError> {
if k == 0 || k > inner.len() || (MAX > 0 && inner.len() > MAX) {
Err(ThresholdError { k, n: inner.len(), max: (MAX > 0).then(|| MAX) })
Err(ThresholdError { k, n: inner.len(), max: (MAX > 0).then_some(MAX) })
} else {
Ok(Threshold { k, inner })
}
Expand All @@ -68,7 +68,7 @@ impl<T, const MAX: usize> Threshold<T, MAX> {
// Do an early return if our minimum size exceeds the max.
if MAX > 0 && min_size > MAX {
let n = iter.count();
return Err(ThresholdError { k, n, max: (MAX > 0).then(|| MAX) });
return Err(ThresholdError { k, n, max: (MAX > 0).then_some(MAX) });
}

let mut inner = Vec::with_capacity(min_size);
Expand Down

0 comments on commit a6e897f

Please sign in to comment.