Remove redundant borrows

Clippy emits:

  warning: this expression borrows a reference

As suggested remove the borrows from the front of vars that are already references.
This commit is contained in:
Tobin Harding
2021-06-08 13:57:55 +10:00
parent 3b446c9e14
commit 12de13b95c
8 changed files with 21 additions and 21 deletions

View File

@@ -320,7 +320,7 @@ impl Database for Tree {
.map(|b| -> Result<_, Error> {
let mut txdetails: TransactionDetails = serde_json::from_slice(&b)?;
if include_raw {
txdetails.transaction = self.get_raw_tx(&txid)?;
txdetails.transaction = self.get_raw_tx(txid)?;
}
Ok(txdetails)

View File

@@ -394,7 +394,7 @@ impl Database for MemoryDatabase {
Ok(self.map.get(&key).map(|b| {
let mut txdetails: TransactionDetails = b.downcast_ref().cloned().unwrap();
if include_raw {
txdetails.transaction = self.get_raw_tx(&txid).unwrap();
txdetails.transaction = self.get_raw_tx(txid).unwrap();
}
txdetails