rust: fix clippy lints for clippy::manual_find

pull/8073/head
Jason Ish 4 years ago committed by Victor Julien
parent 119e02cf81
commit 7ebdfa539a

@ -153,12 +153,7 @@ impl RdpState {
}
fn get_tx(&self, tx_id: u64) -> Option<&RdpTransaction> {
for tx in &self.transactions {
if tx.id == tx_id {
return Some(tx);
}
}
return None;
self.transactions.iter().find(|&tx| tx.id == tx_id)
}
fn new_tx(&mut self, item: RdpTransactionItem) -> RdpTransaction {

Loading…
Cancel
Save