Skip to content

Commit db3c566

Browse files
committed
simplify sorting with sort_by_key
1 parent 1c362b1 commit db3c566

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

integration_test/src/main.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1433,15 +1433,7 @@ fn test_get_zmq_notifications(cl: &Client) {
14331433

14341434
// it doesn't matter in which order Bitcoin Core returns the result,
14351435
// but checking it is easier if it has a known order
1436-
zmq_info.sort_by(|a, b| {
1437-
if a.address < b.address {
1438-
Ordering::Less
1439-
} else if a.address == b.address {
1440-
Ordering::Equal
1441-
} else {
1442-
Ordering::Greater
1443-
}
1444-
});
1436+
zmq_info.sort_by_key(|result| result.address);
14451437

14461438
assert!(
14471439
zmq_info

0 commit comments

Comments
 (0)