Skip to content

Commit

Permalink
address nits
Browse files Browse the repository at this point in the history
Signed-off-by: Brian L. Troutwine <brian@troutwine.us>
  • Loading branch information
blt committed Feb 9, 2022
1 parent 9397baa commit 4b1e68a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/vector-core/src/fanout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,12 @@ impl Fanout {
sink.flush().await?;
}
} else {
let mut faulty_sinks = Vec::with_capacity(0);
let mut faulty_sinks = Vec::new();

{
let mut jobs = FuturesUnordered::new();
let mut clone_army: Vec<Vec<Event>> = Vec::with_capacity(self.sinks.len());
let mut clone_army: Vec<Vec<Event>> =
Vec::with_capacity(self.sinks.iter().filter(|x| x.1.is_some()).count());
for _ in 0..(self.sinks.len() - 1) {
clone_army.push(events.clone());
}
Expand Down

0 comments on commit 4b1e68a

Please sign in to comment.