Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
TommyCpp committed Nov 19, 2020
1 parent 2c59fcf commit 0d18482
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions opentelemetry/src/sdk/trace/span_processor.rs
Expand Up @@ -277,9 +277,8 @@ impl BatchSpanProcessor {
}
// Span batch interval time reached or a force flush has been invoked, export current spans.
BatchMessage::Flush(Some(ch)) => {
let mut results = Vec::with_capacity(
spans.len() / config.max_export_batch_size + 1,
);
let mut results =
Vec::with_capacity(spans.len() / config.max_export_batch_size + 1);
while !spans.is_empty() {
let batch = spans.split_off(
spans.len().saturating_sub(config.max_export_batch_size),
Expand Down Expand Up @@ -315,9 +314,8 @@ impl BatchSpanProcessor {
}
// Stream has terminated or processor is shutdown, return to finish execution.
BatchMessage::Shutdown(ch) => {
let mut results = Vec::with_capacity(
spans.len() / config.max_export_batch_size + 1,
);
let mut results =
Vec::with_capacity(spans.len() / config.max_export_batch_size + 1);
while !spans.is_empty() {
let batch = spans.split_off(
spans.len().saturating_sub(config.max_export_batch_size),
Expand Down

0 comments on commit 0d18482

Please sign in to comment.