summaryrefslogtreecommitdiffstats
path: root/tokio/tests/io_read_exact.rs
diff options
context:
space:
mode:
authorCarl Lerche <me@carllerche.com>2019-06-27 00:05:01 -0700
committerGitHub <noreply@github.com>2019-06-27 00:05:01 -0700
commited4d4a5353d07d2428072965ea23c9a6eba5d87d (patch)
treee18da92f826a22eb253cc5d41149457a547910a3 /tokio/tests/io_read_exact.rs
parent1f47ed3dcc4b582315cdbfb195495d7d4c76d3f3 (diff)
chore: format code and enable rustfmt CI task (#1212)
Diffstat (limited to 'tokio/tests/io_read_exact.rs')
-rw-r--r--tokio/tests/io_read_exact.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/tokio/tests/io_read_exact.rs b/tokio/tests/io_read_exact.rs
index 1e3ab4ed..eae7435f 100644
--- a/tokio/tests/io_read_exact.rs
+++ b/tokio/tests/io_read_exact.rs
@@ -18,7 +18,7 @@ async fn read_exact() {
fn poll_read(
mut self: Pin<&mut Self>,
_cx: &mut Context<'_>,
- buf: &mut [u8]
+ buf: &mut [u8],
) -> Poll<io::Result<usize>> {
let me = &mut *self;
let len = buf.len();
@@ -29,7 +29,9 @@ async fn read_exact() {
}
let mut buf = Box::new([0; 8]);
- let mut rd = Rd { val: b"hello world" };
+ let mut rd = Rd {
+ val: b"hello world",
+ };
let n = assert_ok!(rd.read_exact(&mut buf[..]).await);
assert_eq!(n, 8);