diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index f8c56286..566e1c12 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -17,14 +17,8 @@ jobs: env: DO_INTEGRATION: true - rust: beta - env: - DUMMY: true - rust: nightly - env: - DUMMY: true - - rust: 1.41.1 - env: - PIN_VERSIONS: true + - rust: 1.48.0 steps: - name: Install test dependencies run: sudo apt-get install -y binutils-dev libunwind8-dev diff --git a/README.md b/README.md index f53f3538..9aa203a8 100644 --- a/README.md +++ b/README.md @@ -10,4 +10,4 @@ structures and network messages related to Elements ## Minimum Supported Rust Version (MSRV) -This library should always compile with any combination of features on **Rust 1.41.1**. +This library should always compile with any combination of features on **Rust 1.48.0**. diff --git a/clippy.toml b/clippy.toml new file mode 100644 index 00000000..11d46a73 --- /dev/null +++ b/clippy.toml @@ -0,0 +1 @@ +msrv = "1.48.0" diff --git a/contrib/test.sh b/contrib/test.sh index 92554052..5856ac26 100755 --- a/contrib/test.sh +++ b/contrib/test.sh @@ -9,11 +9,9 @@ then fi # Pin dependencies as required if we are using MSRV toolchain. -if cargo --version | grep "1\.41"; then +if cargo --version | grep "1\.48"; then # 1.0.157 uses syn 2.0 which requires edition 2018 cargo update -p serde --precise 1.0.156 - # 1.0.108 uses `matches!` macro so does not work with Rust 1.41.1, bad `syn` no biscuit. - cargo update -p syn --precise 1.0.107 fi # Test without any features first diff --git a/elementsd-tests/src/taproot.rs b/elementsd-tests/src/taproot.rs index fb778ac6..e12a029c 100644 --- a/elementsd-tests/src/taproot.rs +++ b/elementsd-tests/src/taproot.rs @@ -283,17 +283,17 @@ fn taproot_tests() { SchnorrSigHashType::AllPlusAnyoneCanPay, ]; - for conf_prevout in [true, false] { + for &conf_prevout in &[true, false] { // whether the input is blinded - for blind in [true, false] { + for &blind in &[true, false] { // blind the current tx if !blind && conf_prevout { // trying to spend a confidential txout to all explicit transactions // This is not possible to do because we need to balance the blinding factors continue; } - for script_spend in [true, false] { - for sighash_ty in sighash_tys { + for &script_spend in &[true, false] { + for &sighash_ty in &sighash_tys { taproot_spend_test( &elementsd, &secp, diff --git a/src/pset/serialize.rs b/src/pset/serialize.rs index 79aeec8e..0dc70524 100644 --- a/src/pset/serialize.rs +++ b/src/pset/serialize.rs @@ -324,7 +324,7 @@ impl Serialize for (XOnlyPublicKey, TapLeafHash) { let ser_pk = self.0.serialize(); let mut buf = Vec::with_capacity(ser_pk.len() + TapLeafHash::LEN); buf.extend(&ser_pk); - buf.extend(self.1.to_byte_array()); + buf.extend(&self.1.to_byte_array()); buf } }