Skip to content

Commit

Permalink
Update lib/vector-core/src/fanout.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Bruce Guenter <bruce.guenter@datadoghq.com>
  • Loading branch information
blt and bruceg committed Feb 9, 2022
1 parent 4b1e68a commit 497a94d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/vector-core/src/fanout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ impl Fanout {

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

0 comments on commit 497a94d

Please sign in to comment.