Return a Vec from to_blobs() instead of using a mut parameter

This commit is contained in:
Greg Fitzgerald
2018-09-03 01:02:25 -10:00
parent 8cc030ef84
commit 2aa72cc72e
3 changed files with 8 additions and 15 deletions

View File

@@ -613,11 +613,7 @@ pub fn new_window_from_entries(
blob_recycler: &BlobRecycler,
) -> SharedWindow {
// convert to blobs
let mut blobs = Vec::new();
ledger_tail.to_blobs(&blob_recycler, &mut blobs);
// flatten deque to vec
let blobs: Vec<_> = blobs.into_iter().collect();
let blobs = ledger_tail.to_blobs(&blob_recycler);
initialized_window(&node_info, blobs, entry_height)
}