Some simple Option / Result / iterator pattern simplifications (#3205)

This commit is contained in:
François Garillot
2020-01-29 09:20:57 -05:00
committed by GitHub
parent 616dad43fd
commit dcdbdd4bcc
10 changed files with 39 additions and 57 deletions
+1 -5
View File
@@ -403,11 +403,7 @@ impl Pool {
// Oldest (based on pool insertion time) will then be prioritized.
tx_buckets.sort_unstable_by_key(|x| (Reverse(x.fee_to_weight), x.age_idx));
tx_buckets
.into_iter()
.map(|x| x.raw_txs)
.flatten()
.collect()
tx_buckets.into_iter().flat_map(|x| x.raw_txs).collect()
}
pub fn find_matching_transactions(&self, kernels: &[TxKernel]) -> Vec<Transaction> {