Skip to content

Commit 14ed0e4

Browse files
committed
ref: use matches
1 parent 058a3ed commit 14ed0e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/block_range_scanner.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1635,8 +1635,8 @@ mod tests {
16351635
service.send_to_subscriber(Message::Error(ScannerError::BlockNotFound(4.into()))).await;
16361636

16371637
match rx.recv().await.expect("subscriber should stay open") {
1638-
Message::Error(ScannerError::BlockNotFound(attempts)) => {
1639-
assert_eq!(attempts, 4.into());
1638+
Message::Error(err) => {
1639+
assert!(matches!(err, ScannerError::BlockNotFound(BlockNumberOrTag::Number(4))));
16401640
}
16411641
other => panic!("unexpected message: {other:?}"),
16421642
}

0 commit comments

Comments
 (0)