diff --git a/src/blockdata/block.rs b/src/blockdata/block.rs index 1d9e7a11..c09467f0 100644 --- a/src/blockdata/block.rs +++ b/src/blockdata/block.rs @@ -521,7 +521,7 @@ mod tests { } // test with modified header - let mut invalid_header: BlockHeader = some_header.clone(); + let mut invalid_header: BlockHeader = some_header; invalid_header.version += 1; match invalid_header.validate_pow(&invalid_header.target()) { Err(BlockBadProofOfWork) => (), diff --git a/src/util/bip158.rs b/src/util/bip158.rs index 3b823f00..25f05b70 100644 --- a/src/util/bip158.rs +++ b/src/util/bip158.rs @@ -554,7 +554,7 @@ mod test { let mut si = scripts.iter(); for tx in block.txdata.iter().skip(1) { for input in tx.input.iter() { - txmap.insert(input.previous_output.clone(), Script::from(Vec::from_hex(si.next().unwrap().as_str().unwrap()).unwrap())); + txmap.insert(input.previous_output, Script::from(Vec::from_hex(si.next().unwrap().as_str().unwrap()).unwrap())); } } @@ -562,7 +562,7 @@ mod test { |o| if let Some(s) = txmap.get(o) { Ok(s.clone()) } else { - Err(Error::UtxoMissing(o.clone())) + Err(Error::UtxoMissing(*o)) }).unwrap(); let test_filter = BlockFilter::new(filter_content.as_slice());