Remove calls to clone from types that implement Copy
Clippy emits: warning: using `clone` on type `blockdata::transaction::OutPoint` which implements the `Copy` trait Remove calls to `clone` from types that implement `Copy`.
This commit is contained in:
parent
2b8d93ec4b
commit
b24a112f08
|
@ -521,7 +521,7 @@ mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
// test with modified header
|
// test with modified header
|
||||||
let mut invalid_header: BlockHeader = some_header.clone();
|
let mut invalid_header: BlockHeader = some_header;
|
||||||
invalid_header.version += 1;
|
invalid_header.version += 1;
|
||||||
match invalid_header.validate_pow(&invalid_header.target()) {
|
match invalid_header.validate_pow(&invalid_header.target()) {
|
||||||
Err(BlockBadProofOfWork) => (),
|
Err(BlockBadProofOfWork) => (),
|
||||||
|
|
|
@ -554,7 +554,7 @@ mod test {
|
||||||
let mut si = scripts.iter();
|
let mut si = scripts.iter();
|
||||||
for tx in block.txdata.iter().skip(1) {
|
for tx in block.txdata.iter().skip(1) {
|
||||||
for input in tx.input.iter() {
|
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) {
|
|o| if let Some(s) = txmap.get(o) {
|
||||||
Ok(s.clone())
|
Ok(s.clone())
|
||||||
} else {
|
} else {
|
||||||
Err(Error::UtxoMissing(o.clone()))
|
Err(Error::UtxoMissing(*o))
|
||||||
}).unwrap();
|
}).unwrap();
|
||||||
|
|
||||||
let test_filter = BlockFilter::new(filter_content.as_slice());
|
let test_filter = BlockFilter::new(filter_content.as_slice());
|
||||||
|
|
Loading…
Reference in New Issue