Don't unwrap on session new

This commit is contained in:
Stephen Akridge 2020-04-16 07:22:29 -07:00 committed by Michael Vines
parent 7e7cbec8a1
commit 30b3862770
1 changed files with 1 additions and 1 deletions

View File

@ -764,7 +764,7 @@ impl Shredder {
return Err(reed_solomon_erasure::Error::TooFewShardsPresent);
}
let session = Session::new(num_data, num_coding).unwrap();
let session = Session::new(num_data, num_coding)?;
let valid_data_len = PACKET_DATA_SIZE - SIZE_OF_DATA_SHRED_IGNORED_TAIL;
let coding_block_offset = SIZE_OF_CODING_SHRED_HEADER + SIZE_OF_COMMON_SHRED_HEADER;