diff --git a/src/blockdata/transaction.rs b/src/blockdata/transaction.rs index 42f1565a..7859d197 100644 --- a/src/blockdata/transaction.rs +++ b/src/blockdata/transaction.rs @@ -1092,7 +1092,7 @@ mod tests { let expected_strippedsize = (EXPECTED_WEIGHT - tx_bytes.len()) / (WITNESS_SCALE_FACTOR - 1); assert_eq!(realtx.strippedsize(), expected_strippedsize); // Construct a transaction without the witness data. - let mut tx_without_witness = realtx.clone(); + let mut tx_without_witness = realtx; tx_without_witness.input.iter_mut().for_each(|input| input.witness.clear()); assert_eq!(tx_without_witness.weight(), expected_strippedsize*WITNESS_SCALE_FACTOR); assert_eq!(tx_without_witness.size(), expected_strippedsize); diff --git a/src/util/bip158.rs b/src/util/bip158.rs index fa52a167..a9fe4819 100644 --- a/src/util/bip158.rs +++ b/src/util/bip158.rs @@ -651,7 +651,7 @@ mod test { query.push(p.clone()); } query.push(Vec::from_hex("abcdef").unwrap()); - let mut input = Cursor::new(bytes.clone()); + let mut input = Cursor::new(bytes); assert!(!reader.match_all(&mut input, &mut query.iter().map(|v| v.as_slice())).unwrap()); } } diff --git a/src/util/psbt/serialize.rs b/src/util/psbt/serialize.rs index 644afe02..b4b4ea67 100644 --- a/src/util/psbt/serialize.rs +++ b/src/util/psbt/serialize.rs @@ -393,7 +393,7 @@ mod tests { let mut builder = compose_taproot_builder(0x51, &[2, 2, 2]); builder = builder.add_leaf_with_ver(3, Script::from_hex("b9").unwrap(), LeafVersion::from_consensus(0xC2).unwrap()).unwrap(); builder = builder.add_hidden_node(3, sha256::Hash::default()).unwrap(); - assert!(TapTree::from_builder(builder.clone()).is_err()); + assert!(TapTree::from_builder(builder).is_err()); } #[test]