Skip to content

Commit

Permalink
cargo clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
jmillan committed Oct 23, 2023
1 parent 481b654 commit 2c80646
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
5 changes: 3 additions & 2 deletions rust/benches/direct_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async fn create_data_producer_consumer_pair(
.produce_data(DataProducerOptions::new_direct())
.await?;
let data_consumer = direct_transport
.consume_data(DataConsumerOptions::new_direct(data_producer.id()))
.consume_data(DataConsumerOptions::new_direct(data_producer.id(), None))
.await?;

Ok((data_producer, data_consumer))
Expand Down Expand Up @@ -51,7 +51,8 @@ pub fn criterion_benchmark(c: &mut Criterion) {
let _ = sender.send(());
});

let _ = direct_data_producer.send(WebRtcMessage::Binary(Cow::from(data)));
let _ =
direct_data_producer.send(WebRtcMessage::Binary(Cow::from(data)), None, None);

let _ = receiver.recv();
})
Expand Down
12 changes: 6 additions & 6 deletions rust/tests/integration/direct_transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -537,14 +537,14 @@ fn send_with_subchannels_succeeds() {
.expect("Failed tor receive all messages");

let received_messages_1 = received_messages_1.lock().clone();
assert_eq!(received_messages_1.contains(&both.to_string()), true);
assert_eq!(received_messages_1.contains(&dc1.to_string()), true);
assert_eq!(received_messages_1.contains(&dc2.to_string()), false);
assert!(received_messages_1.contains(&both.to_string()));
assert!(received_messages_1.contains(&dc1.to_string()));
assert!(!received_messages_1.contains(&dc2.to_string()));

let received_messages_2 = received_messages_2.lock().clone();
assert_eq!(received_messages_2.contains(&both.to_string()), true);
assert_eq!(received_messages_2.contains(&dc1.to_string()), false);
assert_eq!(received_messages_2.contains(&dc2.to_string()), true);
assert!(received_messages_2.contains(&both.to_string()));
assert!(!received_messages_2.contains(&dc1.to_string()));
assert!(received_messages_2.contains(&dc2.to_string()));
});
}

Expand Down

0 comments on commit 2c80646

Please sign in to comment.