Upgrade rust/crates/futures-channel to 0.3.15
Test: make
Change-Id: I09aa640ae00a1055141833a6ff497d4dab47fc97
diff --git a/benches/sync_mpsc.rs b/benches/sync_mpsc.rs
index e22fe60..7c3c3d3 100644
--- a/benches/sync_mpsc.rs
+++ b/benches/sync_mpsc.rs
@@ -7,8 +7,8 @@
futures::{
channel::mpsc::{self, Sender, UnboundedSender},
ready,
- stream::{Stream, StreamExt},
sink::Sink,
+ stream::{Stream, StreamExt},
task::{Context, Poll},
},
futures_test::task::noop_context,
@@ -25,7 +25,6 @@
// 1000 iterations to avoid measuring overhead of initialization
// Result should be divided by 1000
for i in 0..1000 {
-
// Poll, not ready, park
assert_eq!(Poll::Pending, rx.poll_next_unpin(&mut cx));
@@ -73,7 +72,6 @@
})
}
-
/// A Stream that continuously sends incrementing number of the queue
struct TestSender {
tx: Sender<u32>,
@@ -84,9 +82,7 @@
impl Stream for TestSender {
type Item = u32;
- fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>)
- -> Poll<Option<Self::Item>>
- {
+ fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
let this = &mut *self;
let mut tx = Pin::new(&mut this.tx);
@@ -123,12 +119,7 @@
// Each sender can send one item after specified capacity
let (tx, mut rx) = mpsc::channel(0);
- let mut tx: Vec<_> = (0..100).map(|_| {
- TestSender {
- tx: tx.clone(),
- last: 0
- }
- }).collect();
+ let mut tx: Vec<_> = (0..100).map(|_| TestSender { tx: tx.clone(), last: 0 }).collect();
for i in 0..10 {
for x in &mut tx {