Skip to content

Commit

Permalink
Avoid unwrap in ffi bridge
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-signal committed Feb 5, 2021
1 parent 97f48f0 commit 30066ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rust/bridge/ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ impl IdentityKeyStore for FfiIdentityKeyStore {
1 => Ok(true),
r => Err(SignalProtocolError::ApplicationCallbackError(
"save_identity",
Box::new(CallbackError::check(r).unwrap()),
Box::new(CallbackError::check(r).expect("r is non-zero")),
)),
}
}
Expand Down Expand Up @@ -252,7 +252,7 @@ impl IdentityKeyStore for FfiIdentityKeyStore {
1 => Ok(true),
r => Err(SignalProtocolError::ApplicationCallbackError(
"is_trusted_identity",
Box::new(CallbackError::check(r).unwrap()),
Box::new(CallbackError::check(r).expect("r is non-zero")),
)),
}
}
Expand Down

0 comments on commit 30066ec

Please sign in to comment.