diff --git a/bitcoin/src/crypto/sighash.rs b/bitcoin/src/crypto/sighash.rs index 0671e3654..5498211a0 100644 --- a/bitcoin/src/crypto/sighash.rs +++ b/bitcoin/src/crypto/sighash.rs @@ -994,7 +994,7 @@ impl> SighashCache { match sighash { EcdsaSighashType::All => { self_.output.consensus_encode(writer)?; - }, + } EcdsaSighashType::Single => { // sign all outputs up to and including this one, but erase // all of them except for this one @@ -1002,13 +1002,14 @@ impl> SighashCache { writer.emit_compact_size(count + 1)?; for _ in 0..count { // consensus encoding of the "NULL txout" - max amount, empty script_pubkey - writer.write_all(&[0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00])?; + writer + .write_all(&[0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00])?; } self_.output[count].consensus_encode(writer)?; - }, + } EcdsaSighashType::None => { writer.emit_compact_size(0u8)?; - }, + } _ => unreachable!(), }; self_.lock_time.consensus_encode(writer)?; diff --git a/primitives/src/locktime/absolute.rs b/primitives/src/locktime/absolute.rs index 5bb295c8f..976f56143 100644 --- a/primitives/src/locktime/absolute.rs +++ b/primitives/src/locktime/absolute.rs @@ -516,7 +516,6 @@ mod tests { assert!(lock_by_time.is_satisfied_by(height, time_same)); assert!(lock_by_time.is_satisfied_by(height, time_after)); assert!(!lock_by_time.is_satisfied_by(height, time_before)); - } #[test] diff --git a/primitives/src/script/owned.rs b/primitives/src/script/owned.rs index 45a8aa687..29950cbfb 100644 --- a/primitives/src/script/owned.rs +++ b/primitives/src/script/owned.rs @@ -95,7 +95,6 @@ impl<'a> Arbitrary<'a> for ScriptBuf { } } - #[cfg(test)] mod tests { use super::*;