diff options
author | Lucio Franco <luciofranco14@gmail.com> | 2020-10-12 12:41:40 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-12 12:41:40 -0400 |
commit | f8c91f2ead24ed6e268a820405c329032dd30da6 (patch) | |
tree | 49df96ec1434bd5f253f1cec9422cadb1ca1be6a /tokio/tests | |
parent | b5750825431afe6fe227a6fcf30a593b51ceff1b (diff) |
io: Rename `ReadBuf` methods (#2945)
This changes `ReadBuf::add_filled` to `ReadBuf::advance` and
`ReadBuf::append` to `ReadBuf::put_slice`. This is just a
mechanical change.
Closes #2769
Diffstat (limited to 'tokio/tests')
-rw-r--r-- | tokio/tests/io_copy.rs | 2 | ||||
-rw-r--r-- | tokio/tests/io_read.rs | 2 | ||||
-rw-r--r-- | tokio/tests/io_split.rs | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/tokio/tests/io_copy.rs b/tokio/tests/io_copy.rs index aed6c789..9ed7995c 100644 --- a/tokio/tests/io_copy.rs +++ b/tokio/tests/io_copy.rs @@ -18,7 +18,7 @@ async fn copy() { buf: &mut ReadBuf<'_>, ) -> Poll<io::Result<()>> { if self.0 { - buf.append(b"hello world"); + buf.put_slice(b"hello world"); self.0 = false; Poll::Ready(Ok(())) } else { diff --git a/tokio/tests/io_read.rs b/tokio/tests/io_read.rs index 0a717cf5..29d7d6d7 100644 --- a/tokio/tests/io_read.rs +++ b/tokio/tests/io_read.rs @@ -24,7 +24,7 @@ async fn read() { assert_eq!(0, self.poll_cnt); self.poll_cnt += 1; - buf.append(b"hello world"); + buf.put_slice(b"hello world"); Poll::Ready(Ok(())) } } diff --git a/tokio/tests/io_split.rs b/tokio/tests/io_split.rs index 7b401424..db168e9f 100644 --- a/tokio/tests/io_split.rs +++ b/tokio/tests/io_split.rs @@ -15,7 +15,7 @@ impl AsyncRead for RW { _cx: &mut Context<'_>, buf: &mut ReadBuf<'_>, ) -> Poll<io::Result<()>> { - buf.append(&[b'z']); + buf.put_slice(&[b'z']); Poll::Ready(Ok(())) } } |