Skip to content

Commit

Permalink
fix unwrap
Browse files Browse the repository at this point in the history
  • Loading branch information
rink1969 committed Jul 18, 2020
1 parent 7a23d75 commit 42c0b13
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion proof/src/bft_proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ impl BftProof {

impl From<Proof> for BftProof {
fn from(p: Proof) -> Self {
let decoded: BftProof = deserialize(&p.get_content()[..]).unwrap();
let decoded: BftProof =
deserialize(&p.get_content()[..]).unwrap_or_else(|_| BftProof::default());
decoded
}
}
Expand Down

0 comments on commit 42c0b13

Please sign in to comment.