diff options
Diffstat (limited to 'vendor/futures-util/src/io/read_exact.rs')
-rw-r--r-- | vendor/futures-util/src/io/read_exact.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vendor/futures-util/src/io/read_exact.rs b/vendor/futures-util/src/io/read_exact.rs index 02e38c35b..cd0b20e59 100644 --- a/vendor/futures-util/src/io/read_exact.rs +++ b/vendor/futures-util/src/io/read_exact.rs @@ -30,7 +30,7 @@ impl<R: AsyncRead + ?Sized + Unpin> Future for ReadExact<'_, R> { while !this.buf.is_empty() { let n = ready!(Pin::new(&mut this.reader).poll_read(cx, this.buf))?; { - let (_, rest) = mem::replace(&mut this.buf, &mut []).split_at_mut(n); + let (_, rest) = mem::take(&mut this.buf).split_at_mut(n); this.buf = rest; } if n == 0 { |