Skip to content

Commit

Permalink
Simplify init code.
Browse files Browse the repository at this point in the history
  • Loading branch information
elliottslaughter committed Oct 20, 2023
1 parent 93fb3d5 commit cf6cbe5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/merge_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ pub struct MergeDeferredDataSource {
impl MergeDeferredDataSource {
pub fn new(data_sources: Vec<Box<dyn DeferredDataSource>>) -> 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,
Expand Down

0 comments on commit cf6cbe5

Please sign in to comment.