Skip to content

Commit 158e922

Browse files
committed
remove temporary batch variable
1 parent 5e025d2 commit 158e922

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

opentelemetry-sdk/src/logs/log_processor.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,7 @@ impl<T: LogExporter> LogProcessor for SimpleLogProcessor<T> {
117117
.map_err(|_| LogError::MutexPoisoned("SimpleLogProcessor".into()))
118118
.and_then(|exporter| {
119119
let log_tuple = &[(record as &LogRecord, instrumentation)];
120-
let log_batch = LogBatch::new(log_tuple);
121-
futures_executor::block_on(exporter.export(log_batch))
120+
futures_executor::block_on(exporter.export(LogBatch::new(log_tuple)))
122121
});
123122
// Handle errors with specific static names
124123
match result {
@@ -446,8 +445,7 @@ where
446445
.iter()
447446
.map(|log_data| (&log_data.0, &log_data.1))
448447
.collect();
449-
let log_batch = LogBatch::new(log_vec.as_slice());
450-
let export = exporter.export(log_batch);
448+
let export = exporter.export(LogBatch::new(log_vec.as_slice()));
451449
let export_result = futures_executor::block_on(export);
452450

453451
match export_result {
@@ -716,8 +714,7 @@ where
716714
.iter()
717715
.map(|log_data| (&log_data.0, &log_data.1))
718716
.collect();
719-
let log_batch = LogBatch::new(log_vec.as_slice());
720-
let export = exporter.export(log_batch);
717+
let export = exporter.export(LogBatch::new(log_vec.as_slice()));
721718
let timeout = runtime.delay(time_out);
722719
pin_mut!(export);
723720
pin_mut!(timeout);

0 commit comments

Comments
 (0)