Remove explicit return

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
This commit is contained in:
Deirdre Connolly 2021-09-13 15:27:10 -04:00 committed by Deirdre Connolly
parent c03d1c156b
commit ccbbb36f7f
1 changed files with 2 additions and 2 deletions

View File

@ -103,13 +103,13 @@ impl Storage {
// `retain()` removes it and returns `Some(UnminedTx)`. If it's not // `retain()` removes it and returns `Some(UnminedTx)`. If it's not
// present and nothing changes, returns `None`. // present and nothing changes, returns `None`.
return match self.verified.clone().iter().find(|tx| &tx.id == txid) { match self.verified.clone().iter().find(|tx| &tx.id == txid) {
Some(tx) => { Some(tx) => {
self.verified.retain(|tx| &tx.id != txid); self.verified.retain(|tx| &tx.id != txid);
Some(tx.clone()) Some(tx.clone())
} }
None => None, None => None,
}; }
} }
/// Returns the set of [`UnminedTxId`]s in the mempool. /// Returns the set of [`UnminedTxId`]s in the mempool.