Fix erasure compilation

This commit is contained in:
Stephen Akridge
2018-05-24 17:19:49 -07:00
committed by Greg Fitzgerald
parent f1075191fe
commit ea97529185
2 changed files with 9 additions and 4 deletions

View File

@@ -153,7 +153,7 @@ pub fn decode_blocks(data: &mut [&mut [u8]], coding: &[&[u8]], erasures: &[i32])
// Generate coding blocks in window from consumed to consumed+NUM_DATA
pub fn generate_coding(
re: &BlobRecycler,
window: &mut Vec<SharedBlob>,
window: &mut Vec<Option<SharedBlob>>,
consumed: usize,
) -> Result<()> {
let mut data_blobs = Vec::new();
@@ -183,7 +183,7 @@ pub fn generate_coding(
let coding_end = consumed + NUM_CODED;
for i in coding_start..coding_end {
let n = i % window.len();
window[n] = re.allocate();
window[n] = Some(re.allocate());
coding_blobs.push(
window[n]
.clone()