diff options
author | Alex Auvolat <alex@adnab.me> | 2022-07-22 13:48:43 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-07-22 13:48:43 +0200 |
commit | 50358b944ae7ee4b4aa292ede8bc5d185c86df65 (patch) | |
tree | aaca17843db5f44770d6ff308c45d8321274c70b /src/stream.rs | |
parent | aa1b29d41a680f9ae266ed4bdecec89db58226c1 (diff) | |
download | netapp-50358b944ae7ee4b4aa292ede8bc5d185c86df65.tar.gz netapp-50358b944ae7ee4b4aa292ede8bc5d185c86df65.zip |
Cargo fmt; better adapt with_capacity_values
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 |