diff options
Diffstat (limited to 'vendor/futures-util/src/io/read_to_string.rs')
-rw-r--r-- | vendor/futures-util/src/io/read_to_string.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vendor/futures-util/src/io/read_to_string.rs b/vendor/futures-util/src/io/read_to_string.rs index 457af59e4..c175396d8 100644 --- a/vendor/futures-util/src/io/read_to_string.rs +++ b/vendor/futures-util/src/io/read_to_string.rs @@ -22,7 +22,7 @@ impl<R: ?Sized + Unpin> Unpin for ReadToString<'_, R> {} impl<'a, R: AsyncRead + ?Sized + Unpin> ReadToString<'a, R> { pub(super) fn new(reader: &'a mut R, buf: &'a mut String) -> Self { let start_len = buf.len(); - Self { reader, bytes: mem::replace(buf, String::new()).into_bytes(), buf, start_len } + Self { reader, bytes: mem::take(buf).into_bytes(), buf, start_len } } } |