Address `clippy::slow_vector_initialization`

This commit is contained in:
Joseph Birr-Pixton 2024-04-19 15:01:53 +01:00 committed by Joe Birr-Pixton
parent e03556ff1e
commit 5e7a06ca45
2 changed files with 2 additions and 4 deletions

View File

@ -473,8 +473,7 @@ fn bench_bulk(params: &BenchmarkParam, plaintext_size: u64, max_fragment_size: O
do_handshake(&mut client, &mut server);
let mut buf = Vec::new();
buf.resize(plaintext_size as usize, 0u8);
let mut buf = vec![0u8; plaintext_size as usize];
let total_data = apply_work_multiplier(if plaintext_size < 8192 {
64 * 1024 * 1024

View File

@ -782,8 +782,7 @@ fn exec(opts: &Options, mut sess: Connection, count: usize) {
}
if !sess.is_handshaking() && opts.export_keying_material > 0 && !sent_exporter {
let mut export = Vec::new();
export.resize(opts.export_keying_material, 0u8);
let mut export = vec![0u8; opts.export_keying_material];
sess.export_keying_material(
&mut export,
opts.export_keying_material_label