Skip to content

Commit

Permalink
Fix clippy lints for Rust 1.60 (informalsystems#2079)
Browse files Browse the repository at this point in the history
  • Loading branch information
mzabaluev authored Apr 7, 2022
1 parent a3b5e07 commit cc91e30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions relayer/src/event/monitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ fn stream_batches(
.copied()
.expect("internal error: found empty group"); // SAFETY: upheld by `group_while`

let mut events = events.into_iter().map(|(_, e)| e).collect();
let mut events = events.into_iter().map(|(_, e)| e).collect::<Vec<_>>();
sort_events(&mut events);

EventBatch {
Expand All @@ -454,7 +454,7 @@ fn stream_batches(

/// Sort the given events by putting the NewBlock event first,
/// and leaving the other events as is.
fn sort_events(events: &mut Vec<IbcEvent>) {
fn sort_events(events: &mut [IbcEvent]) {
events.sort_by(|a, b| match (a, b) {
(IbcEvent::NewBlock(_), _) => Ordering::Less,
_ => Ordering::Equal,
Expand Down

0 comments on commit cc91e30

Please sign in to comment.