summaryrefslogtreecommitdiffstats
path: root/vendor/futures-util/src/io/read_line.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/futures-util/src/io/read_line.rs')
-rw-r--r--vendor/futures-util/src/io/read_line.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/vendor/futures-util/src/io/read_line.rs b/vendor/futures-util/src/io/read_line.rs
index c75af9471..e1b8fc945 100644
--- a/vendor/futures-util/src/io/read_line.rs
+++ b/vendor/futures-util/src/io/read_line.rs
@@ -22,7 +22,7 @@ impl<R: ?Sized + Unpin> Unpin for ReadLine<'_, R> {}
impl<'a, R: AsyncBufRead + ?Sized + Unpin> ReadLine<'a, R> {
pub(super) fn new(reader: &'a mut R, buf: &'a mut String) -> Self {
- Self { reader, bytes: mem::replace(buf, String::new()).into_bytes(), buf, read: 0 }
+ Self { reader, bytes: mem::take(buf).into_bytes(), buf, read: 0 }
}
}