diff options
Diffstat (limited to 'src/stream.rs')
-rw-r--r-- | src/stream.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/stream.rs b/src/stream.rs index ae57d62..aa7641f 100644 --- a/src/stream.rs +++ b/src/stream.rs @@ -83,13 +83,7 @@ impl ByteStreamReader { } pub fn take_buffer(&mut self) -> Bytes { - let bytes = Bytes::from( - self .buf - .iter() - .map(|x| &x[..]) - .collect::<Vec<_>>() - .concat(), - ); + let bytes = Bytes::from(self.buf.iter().map(|x| &x[..]).collect::<Vec<_>>().concat()); self.buf.clear(); self.buf_len = 0; bytes |