Skip to content

Commit d005cb8

Browse files
committed
better vec initialize
1 parent 6c4cbc4 commit d005cb8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

opentelemetry-sdk/src/logs/log_processor.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,7 @@ impl BatchLogProcessor {
323323
max_queue_size = max_queue_size,
324324
);
325325
let mut last_export_time = Instant::now();
326-
let mut logs = Vec::new();
327-
logs.reserve(config.max_export_batch_size);
326+
let mut logs = Vec::with_capacity(config.max_export_batch_size);
328327

329328
loop {
330329
let remaining_time_option = config

0 commit comments

Comments
 (0)