Skip to content

Commit 4be301d

Browse files
committed
feat: added assert_failure method similar to assert_success
1 parent c28d208 commit 4be301d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

types/src/transaction/result.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,10 @@ impl ExecutionFinalResult {
254254
self.into_result().unwrap()
255255
}
256256

257+
pub fn assert_failure(self) -> ExecutionResult<TxExecutionError> {
258+
self.into_result().unwrap_err()
259+
}
260+
257261
/// Deserialize an instance of type `T` from bytes of JSON text sourced from the
258262
/// execution result of this call. This conversion can fail if the structure of
259263
/// the internal state does not meet up with [`serde::de::DeserializeOwned`]'s

0 commit comments

Comments
 (0)