Skip to content

Commit

Permalink
transit/v2: alloc buffer on heap
Browse files Browse the repository at this point in the history
  • Loading branch information
felinira committed Jul 6, 2024
1 parent ef7e460 commit 00c3ef9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transfer/v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ async fn send_inner(
// use zstd::stream::raw::Encoder;
// let zstd = Encoder::new(zstd::DEFAULT_COMPRESSION_LEVEL);
const BUFFER_LEN: usize = 16 * 1024;
let mut buffer = Box::new([0u8; BUFFER_LEN]);
let mut buffer = vec![0u8; BUFFER_LEN].into_boxed_slice();

for AnswerMessageInner {
file,
Expand Down

0 comments on commit 00c3ef9

Please sign in to comment.