Skip to content

Commit

Permalink
use matches!
Browse files Browse the repository at this point in the history
  • Loading branch information
iFrostizz committed Jul 9, 2024
1 parent e55df6f commit 7fa89ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion x/programs/rust/examples/timelock/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,6 @@ mod tests {
.response::<Result<DeferDeserialize, Error>>()
.unwrap();

assert_eq!(res, Err(Error::AlreadyExecuted));
assert!(matches!(res, Err(Error::AlreadyExecuted)));
}
}
2 changes: 1 addition & 1 deletion x/programs/rust/wasmlanche-sdk/src/program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use thiserror::Error;
/// Defer deserialization from bytes
/// <div class="warning">It is possible that this type performs multiple allocations during deserialization. It should be used sparingly.</div>
#[cfg_attr(feature = "debug", derive(Debug))]
#[derive(BorshSerialize, PartialEq)]
#[derive(BorshSerialize)]
pub struct DeferDeserialize(Vec<u8>);

impl DeferDeserialize {
Expand Down

0 comments on commit 7fa89ae

Please sign in to comment.