Merge rust-bitcoin/rust-bitcoin#2304: Whitelist some recent clippy lints

504f77adca ci: revert #2301 "update download-artifact to v4" (Andrew Poelstra)
5fd731f095 Don't match on complex expression (Martin Habovstiak)
6cdbb04820 clippy: whitelist uninhabited_references lint (Andrew Poelstra)

Pull request description:

  Clippy has introduced a couple new lints that are causing our CI to fail. `allow` them.

ACKs for top commit:
  tcharding:
    ACK 504f77adca
  Kixunil:
    ACK 504f77adca

Tree-SHA512: 4b2312dcd1645792fa7c08ca02e8ec9f6a13fc5c275559e78293bb55be93997e21f952cf1ac66c1291c4699b6c2976289222201d7e9bbf68349030d83804f8f7
This commit is contained in:
Andrew Poelstra 2023-12-20 20:34:22 +00:00
commit 9ea3e29d61
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
3 changed files with 7 additions and 4 deletions

View File

@ -69,7 +69,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v3
- name: Display structure of downloaded files
run: ls -R
- run: find executed_* -type f -exec cat {} + | sort > executed

View File

@ -1929,7 +1929,8 @@ mod tests {
let mut witness: Vec<_> = spending.input[1].witness.to_vec();
witness[0][10] = 42;
spending.input[1].witness = Witness::from_slice(&witness);
match spending
let error = spending
.verify(|point: &OutPoint| {
if let Some(tx) = spent3.remove(&point.txid) {
return tx.output.get(point.vout as usize).cloned();
@ -1937,8 +1938,9 @@ mod tests {
None
})
.err()
.unwrap()
{
.unwrap();
match error {
TxVerifyError::ScriptVerification(_) => {}
_ => panic!("Wrong error type"),
}

View File

@ -38,6 +38,7 @@
#![cfg_attr(fuzzing, allow(dead_code, unused_imports))]
// Exclude clippy lints we don't think are valuable
#![allow(clippy::needless_question_mark)] // https://github.com/rust-bitcoin/rust-bitcoin/pull/2134
#![allow(clippy::uninhabited_references)] // falsely claims that 100% safe code is UB
// Disable 16-bit support at least for now as we can't guarantee it yet.
#[cfg(target_pointer_width = "16")]