From 30132c56bb98271dae079a741c3ca1bd81adf5f6 Mon Sep 17 00:00:00 2001 From: "Jamil Lambert, PhD" Date: Tue, 4 Feb 2025 16:43:56 +0000 Subject: [PATCH 1/4] Fix rustdoc indentation New nightly lint picked up an incorrect indentation. Remove extra space. --- hashes/src/internal_macros.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hashes/src/internal_macros.rs b/hashes/src/internal_macros.rs index 39999b3dd..959ccdb47 100644 --- a/hashes/src/internal_macros.rs +++ b/hashes/src/internal_macros.rs @@ -9,7 +9,7 @@ /// /// * `$bits` - number of bits this hash type has /// * `$reverse` - `bool` - `true` if the hash type should be displayed backwards, `false` -/// otherwise. +/// otherwise. /// * `$gen: $gent` - generic type(s) and trait bound(s) /// /// Restrictions on usage: From 55ab2f34a7ca9ec9e1356fcfa366ef212f242e1e Mon Sep 17 00:00:00 2001 From: "Jamil Lambert, PhD" Date: Tue, 4 Feb 2025 16:45:47 +0000 Subject: [PATCH 2/4] Remove manual implementation of ok New rustc nightly gives error: manual implementation of `ok`. Remove it. --- bitcoin/src/blockdata/script/instruction.rs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/bitcoin/src/blockdata/script/instruction.rs b/bitcoin/src/blockdata/script/instruction.rs index 8bf30cdd7..410f6d521 100644 --- a/bitcoin/src/blockdata/script/instruction.rs +++ b/bitcoin/src/blockdata/script/instruction.rs @@ -47,12 +47,7 @@ impl Instruction<'_> { _ => None, } } - Instruction::PushBytes(bytes) => { - match super::read_scriptint_non_minimal(bytes.as_bytes()) { - Ok(v) => Some(v), - _ => None, - } - } + Instruction::PushBytes(bytes) => super::read_scriptint_non_minimal(bytes.as_bytes()).ok(), } } @@ -78,10 +73,7 @@ impl Instruction<'_> { _ => None, } } - Instruction::PushBytes(bytes) => match bytes.read_scriptint() { - Ok(v) => Some(v), - _ => None, - }, + Instruction::PushBytes(bytes) => bytes.read_scriptint().ok(), } } } From 3b350d4f542cca0247e1b2a3de7d903155e99d27 Mon Sep 17 00:00:00 2001 From: "Jamil Lambert, PhD" Date: Tue, 4 Feb 2025 16:54:05 +0000 Subject: [PATCH 3/4] Update to rustc (to nightly-2025-01-31) --- nightly-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nightly-version b/nightly-version index b085f16de..609e36af3 100644 --- a/nightly-version +++ b/nightly-version @@ -1 +1 @@ -nightly-2025-01-24 +nightly-2025-01-31 From ebab2d9aa7310eb62a6c42bf4dfb266cff441965 Mon Sep 17 00:00:00 2001 From: "Jamil Lambert, PhD" Date: Tue, 4 Feb 2025 17:36:26 +0000 Subject: [PATCH 4/4] Update cargo-public-api version Version 0.42.0 is not compatible with the new version of rust nightly. Update to v0.43.0 --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index c9c230cd2..8a45324bf 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -322,6 +322,6 @@ jobs: toolchain: ${{ needs.Prepare.outputs.nightly_version }} - name: "Install cargo-public-api" # Pin version so that updates don't introduce changes to the text files. - run: cargo +stable install --locked cargo-public-api@0.42.0 + run: cargo +stable install --locked cargo-public-api@0.43.0 - name: "Run API checker script" run: ./contrib/check-for-api-changes.sh