declone and close the door (#12035)

* declone and close the door

* cargo fmt

* remove brackets
This commit is contained in:
Squirrel
2022-08-15 20:38:36 +01:00
committed by GitHub
parent 9c2a2495fe
commit a68a80fbae
72 changed files with 344 additions and 512 deletions
@@ -66,7 +66,7 @@ impl ChainApi for TestApi {
uxt: <Self::Block as BlockT>::Extrinsic,
) -> Self::ValidationFuture {
let nonce = uxt.transfer().nonce;
let from = uxt.transfer().from.clone();
let from = uxt.transfer().from;
match self.block_id_to_number(at) {
Ok(Some(num)) if num > 5 => return ready(Ok(Err(InvalidTransaction::Stale.into()))),
@@ -76,7 +76,7 @@ impl ChainApi for TestApi {
ready(Ok(Ok(ValidTransaction {
priority: 4,
requires: if nonce > 1 && self.nonce_dependant {
vec![to_tag(nonce - 1, from.clone())]
vec![to_tag(nonce - 1, from)]
} else {
vec![]
},