You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by "martin-g (via GitHub)" <gi...@apache.org> on 2023/08/18 20:22:50 UTC

[GitHub] [avro] martin-g commented on a diff in pull request #2455: AVRO-3835: [Rust] Get rid of byteorder and zerocopy dependencies

martin-g commented on code in PR #2455:
URL: https://github.com/apache/avro/pull/2455#discussion_r1298838511


##########
lang/rust/avro/src/codec.rs:
##########
@@ -82,18 +82,16 @@ impl Codec {
             }
             #[cfg(feature = "snappy")]
             Codec::Snappy => {
-                use byteorder::ByteOrder;
-
                 let mut encoded: Vec<u8> = vec![0; snap::raw::max_compress_len(stream.len())];
                 let compressed_size = snap::raw::Encoder::new()
                     .compress(&stream[..], &mut encoded[..])
                     .map_err(Error::SnappyCompress)?;
+                encoded.truncate(compressed_size);

Review Comment:
   Good suggestion! Thanks!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org