From dfff85352a33cd5a12ca9134d4077e632ea8e35f Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Wed, 25 May 2022 13:25:23 +1000 Subject: [PATCH] Ignore bytes written for sighash_single bug output Clippy emits: error: written amount is not handled This code is explicitly writing garbage to the writer, no need to handle the number of bytes written. --- src/blockdata/transaction.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/blockdata/transaction.rs b/src/blockdata/transaction.rs index c35a1b65..5488486d 100644 --- a/src/blockdata/transaction.rs +++ b/src/blockdata/transaction.rs @@ -353,7 +353,7 @@ impl Transaction { // will result in the data written to the writer being hashed, however the correct // handling of the SIGHASH_SINGLE bug is to return the 'one array' - either implement // this behaviour manually or use `signature_hash()`. - writer.write(b"[not a transaction] SIGHASH_SINGLE bug")?; + let _ = writer.write(b"[not a transaction] SIGHASH_SINGLE bug")?; return Ok(()) }