Skip to content

Commit

Permalink
fix: use .expect() instead of env::panic_str()
Browse files Browse the repository at this point in the history
  • Loading branch information
denbite committed Sep 27, 2024
1 parent 1a3197e commit 8e2aa96
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@ impl Tokenize for FunctionData {

impl FunctionData {
pub fn encode(&self) -> Bytes {
encode_function_data(&self.function_abi, self.clone()).unwrap_or_else(|error| {
env::log_str(error.to_string().as_str());
env::panic_str("Function arguments don't match provided ABI");
})
encode_function_data(&self.function_abi, self.clone())
.expect("Function arguments don't match provided ABI")
}
}

Expand Down

0 comments on commit 8e2aa96

Please sign in to comment.