mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-07 00:00:08 +02:00
chore: apply rustfmt to all crates (#917)
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
use std::io::{self, Read, Write};
|
||||
|
||||
use futures::{Async, Poll};
|
||||
use futures::sync::BiLock;
|
||||
use bytes::{Buf, BufMut};
|
||||
use futures::sync::BiLock;
|
||||
use futures::{Async, Poll};
|
||||
|
||||
use {AsyncRead, AsyncWrite};
|
||||
|
||||
@@ -66,7 +66,8 @@ impl<T: AsyncWrite> AsyncWrite for WriteHalf<T> {
|
||||
}
|
||||
|
||||
fn write_buf<B: Buf>(&mut self, buf: &mut B) -> Poll<usize, io::Error>
|
||||
where Self: Sized,
|
||||
where
|
||||
Self: Sized,
|
||||
{
|
||||
let mut l = try_ready!(wrap_as_io(self.handle.poll_lock()));
|
||||
l.write_buf(buf)
|
||||
@@ -83,8 +84,8 @@ mod tests {
|
||||
|
||||
use super::{AsyncRead, AsyncWrite, ReadHalf, WriteHalf};
|
||||
use bytes::{BytesMut, IntoBuf};
|
||||
use futures::{Async, Poll, future::lazy, future::ok};
|
||||
use futures::sync::BiLock;
|
||||
use futures::{future::lazy, future::ok, Async, Poll};
|
||||
|
||||
use std::io::{self, Read, Write};
|
||||
|
||||
@@ -138,7 +139,8 @@ mod tests {
|
||||
assert!(rx.read_buf(&mut buf).unwrap().is_ready());
|
||||
|
||||
ok::<(), ()>(())
|
||||
})).unwrap();
|
||||
}))
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -166,6 +168,7 @@ mod tests {
|
||||
assert!(tx.write_buf(&mut buf).unwrap().is_ready());
|
||||
|
||||
ok::<(), ()>(())
|
||||
})).unwrap();
|
||||
}))
|
||||
.unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user