Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
Don't unwrap on session new
Browse files Browse the repository at this point in the history
  • Loading branch information
sakridge authored and mvines committed Apr 16, 2020
1 parent 7e7cbec commit 30b3862
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ledger/src/shred.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 30b3862

Please sign in to comment.