summaryrefslogtreecommitdiff
path: root/instrumentation/src/gateway.rs
diff options
context:
space:
mode:
Diffstat (limited to 'instrumentation/src/gateway.rs')
-rw-r--r--instrumentation/src/gateway.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/instrumentation/src/gateway.rs b/instrumentation/src/gateway.rs
index 3f24dab..e783303 100644
--- a/instrumentation/src/gateway.rs
+++ b/instrumentation/src/gateway.rs
@@ -194,8 +194,7 @@ pub fn api(ctx: TestCtx) {
// Compression bomb
let mut compressor = Compressor::new(CompressionLvl::best());
- let mut compressed = Vec::new();
- compressed.resize(compressor.deflate_compress_bound(big_hello.len()), 0);
+ let mut compressed = vec![0u8; compressor.deflate_compress_bound(big_hello.len())];
let size = compressor
.deflate_compress(big_hello.as_bytes(), &mut compressed)
.unwrap();