Skip to content

Commit

Permalink
refactor: add missed assert_matches!
Browse files Browse the repository at this point in the history
  • Loading branch information
polydez committed Dec 2, 2024
1 parent dbb7640 commit 5bdf535
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@ tonic = { workspace = true }
tracing = { workspace = true }

[dev-dependencies]
assert_matches = { workspace = true}
miden-node-utils = { workspace = true, features = ["tracing-forest"] }
miden-objects = { workspace = true, features = ["testing"] }
7 changes: 4 additions & 3 deletions crates/store/src/db/tests.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use assert_matches::assert_matches;
use miden_lib::transaction::TransactionKernel;
use miden_node_proto::domain::accounts::AccountSummary;
use miden_objects::{
Expand Down Expand Up @@ -416,9 +417,9 @@ fn test_sql_public_account_details() {
assert_eq!(account_read.nonce(), account.nonce());

// Cleared item was not serialized, check it and apply delta only with clear item second time:
assert!(
matches!(account_read.storage().get_item(3), Ok(digest) if digest == RpoDigest::default())
);
assert_matches!(account_read.storage().get_item(3), Ok(digest) => {
assert_eq!(digest, RpoDigest::default());
});

let storage_delta = AccountStorageDelta::from_iters([3], [], []);
account_read
Expand Down

0 comments on commit 5bdf535

Please sign in to comment.