aboutsummaryrefslogtreecommitdiff
path: root/src/io/util/write_all.rs
diff options
context:
space:
mode:
authorChris Wailes <chriswailes@google.com>2022-12-12 11:43:41 -0800
committerJeff Vander Stoep <jeffv@google.com>2023-01-18 19:48:52 +0100
commitff62579fde0625f6c8923b58c9dc848c97c680e6 (patch)
treec049adb6c0fca041cbb303c8311c1084e4a832cd /src/io/util/write_all.rs
parentb669ae94fdcda726d88936d028d35187bf41b016 (diff)
downloadtokio-ff62579fde0625f6c8923b58c9dc848c97c680e6.tar.gz
Upgrade tokio to 1.23.0
This project was upgraded with external_updater. Usage: tools/external_updater/updater.sh update rust/crates/tokio For more info, check https://cs.android.com/android/platform/superproject/+/master:tools/external_updater/README.md Test: TreeHugger Change-Id: Id69553d5e858bddcde0de5b9e72d6bb3c08bafb5
Diffstat (limited to 'src/io/util/write_all.rs')
-rw-r--r--src/io/util/write_all.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/io/util/write_all.rs b/src/io/util/write_all.rs
index e59d41e..abd3e39 100644
--- a/src/io/util/write_all.rs
+++ b/src/io/util/write_all.rs
@@ -42,7 +42,7 @@ where
while !me.buf.is_empty() {
let n = ready!(Pin::new(&mut *me.writer).poll_write(cx, me.buf))?;
{
- let (_, rest) = mem::replace(&mut *me.buf, &[]).split_at(n);
+ let (_, rest) = mem::take(&mut *me.buf).split_at(n);
*me.buf = rest;
}
if n == 0 {