Skip to content

Commit b050681

Browse files
committed
test(ui): Simplify macro usage.
This patch declares the type of the expected value for `assert pos`.
1 parent 1ad5e89 commit b050681

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

crates/matrix-sdk-ui/tests/integration/room_list_service.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ async fn test_sync_resumes_from_previous_state() -> Result<(), Error> {
518518
sync_then_assert_request_and_fake_response! {
519519
[server, room_list, sync]
520520
states = Init => SettingUp,
521-
assert pos None::<String>,
521+
assert pos None,
522522
assert request >= {
523523
"lists": {
524524
ALL_ROOMS: {
@@ -621,7 +621,7 @@ async fn test_sync_resumes_from_previous_state_after_restart() -> Result<(), Err
621621
sync_then_assert_request_and_fake_response! {
622622
[server, room_list, sync]
623623
states = Init => SettingUp,
624-
assert pos None::<String>,
624+
assert pos None,
625625
assert request >= {
626626
"lists": {
627627
ALL_ROOMS: {

crates/matrix-sdk-ui/tests/integration/sliding_sync.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ macro_rules! sliding_sync_then_assert_request_and_fake_response {
122122

123123
// Validate `pos` from the query parameter if specified.
124124
$(
125-
match $pos {
125+
let pos: Option<&str> = $pos;
126+
match pos {
126127
Some(pos) => assert!(wiremock::matchers::query_param("pos", pos).matches(request)),
127128
None => assert!(wiremock::matchers::query_param_is_missing("pos").matches(request)),
128129
}

0 commit comments

Comments
 (0)