diff --git a/src/merge_data.rs b/src/merge_data.rs index 7203aee..97bb6e6 100644 --- a/src/merge_data.rs +++ b/src/merge_data.rs @@ -16,7 +16,8 @@ pub struct MergeDeferredDataSource { impl MergeDeferredDataSource { pub fn new(data_sources: Vec>) -> Self { assert!(!data_sources.is_empty()); - let infos = (0..data_sources.len()).map(|_| VecDeque::new()).collect(); + let mut infos = Vec::new(); + infos.resize_with(data_sources.len(), VecDeque::new); Self { data_sources, infos,