chore: apply rustfmt to all crates (#917)

This commit is contained in:
Carl Lerche
2019-02-21 11:56:15 -08:00
committed by GitHub
parent ab595d0825
commit 80162306e7
253 changed files with 3710 additions and 3407 deletions
+9 -6
View File
@@ -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();
}
}