Skip to content

Commit 491675c

Browse files
OttoAllmendingerllm-git
andcommitted
feat(wasm-utxo): update assertion to use matches! macro
Improves code clarity by replacing the manual match statement with the more concise matches! macro for descriptor type checking. Issue: BTC-2652 Co-authored-by: llm-git <[email protected]>
1 parent 413dcf9 commit 491675c

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

packages/wasm-utxo/src/descriptor.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -218,13 +218,11 @@ mod tests {
218218
.unwrap();
219219

220220
assert!(!desc.has_wildcard());
221-
assert!(
222-
match desc {
223-
WrapDescriptor {
224-
0: crate::descriptor::WrapDescriptorEnum::Definite(_),
225-
} => true,
226-
_ => false,
221+
assert!(matches!(
222+
desc,
223+
WrapDescriptor {
224+
0: crate::descriptor::WrapDescriptorEnum::Definite(_),
227225
}
228-
);
226+
));
229227
}
230228
}

0 commit comments

Comments
 (0)