File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
chainstate/nakamoto/tests Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ impl BurnchainDB {
59
59
let sql = "SELECT op FROM burnchain_db_block_ops WHERE block_hash = ?1" ;
60
60
let args = params ! [ block_hash] ;
61
61
let mut ops: Vec < BlockstackOperationType > = query_rows ( & self . conn , sql, args) ?;
62
- ops. sort_by ( |a , b| a . vtxindex ( ) . cmp ( & b . vtxindex ( ) ) ) ;
62
+ ops. sort_by_key ( |op| op . vtxindex ( ) ) ;
63
63
Ok ( ops)
64
64
}
65
65
Original file line number Diff line number Diff line change @@ -3049,7 +3049,7 @@ fn filter_one_transaction_per_signer_duplicate_nonces() {
3049
3049
txs. clone ( ) ,
3050
3050
) ;
3051
3051
let filtered_txs: Vec < _ > = filtered_transactions. into_values ( ) . collect ( ) ;
3052
- txs. sort_by ( |a , b| a . txid ( ) . cmp ( & b . txid ( ) ) ) ;
3052
+ txs. sort_by_key ( |tx| tx . txid ( ) ) ;
3053
3053
assert_eq ! ( filtered_txs. len( ) , 1 ) ;
3054
3054
assert ! ( filtered_txs. contains( & txs. first( ) . expect( "failed to get first tx" ) ) ) ;
3055
3055
}
You can’t perform that action at this time.
0 commit comments