mirror of https://github.com/ctz/rustls
Address `clippy::slow_vector_initialization`
This commit is contained in:
parent
e03556ff1e
commit
5e7a06ca45
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue