Skip to content

Commit

Permalink
test: replace Option::default() by None
Browse files Browse the repository at this point in the history
  • Loading branch information
bnjbvr committed Jan 16, 2025
1 parent b3a789a commit 6a0333e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions crates/matrix-sdk/tests/integration/room/tags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ async fn test_set_favourite() {
// Server will be called to set the room as favourite.
mock_tag_api(&server, TagName::Favorite, TagOperation::Set, 1).await;

room.set_is_favourite(true, Option::default()).await.unwrap();
room.set_is_favourite(true, None).await.unwrap();

// Mock the response from the server.
let tags = BTreeMap::from([(TagName::Favorite, TagInfo::default())]);
Expand Down Expand Up @@ -125,7 +125,7 @@ async fn test_set_favourite_on_low_priority_room() {
mock_tag_api(&server, TagName::Favorite, TagOperation::Set, 1).await;
mock_tag_api(&server, TagName::LowPriority, TagOperation::Remove, 1).await;

room.set_is_favourite(true, Option::default()).await.unwrap();
room.set_is_favourite(true, None).await.unwrap();

// Mock the response from the server.
let tags = BTreeMap::from([(TagName::Favorite, TagInfo::default())]);
Expand All @@ -148,7 +148,7 @@ async fn test_unset_favourite() {
// Server will be called to unset the room as favourite.
mock_tag_api(&server, TagName::Favorite, TagOperation::Remove, 1).await;

room.set_is_favourite(false, Option::default()).await.unwrap();
room.set_is_favourite(false, None).await.unwrap();

server.verify().await;
}
Expand All @@ -165,7 +165,7 @@ async fn test_set_low_priority() {
// Server will be called to set the room as favourite.
mock_tag_api(&server, TagName::LowPriority, TagOperation::Set, 1).await;

room.set_is_low_priority(true, Option::default()).await.unwrap();
room.set_is_low_priority(true, None).await.unwrap();

// Mock the response from the server.
let tags = BTreeMap::from([(TagName::LowPriority, TagInfo::default())]);
Expand Down Expand Up @@ -198,7 +198,7 @@ async fn test_set_low_priority_on_favourite_room() {
mock_tag_api(&server, TagName::LowPriority, TagOperation::Set, 1).await;
mock_tag_api(&server, TagName::Favorite, TagOperation::Remove, 1).await;

room.set_is_low_priority(true, Option::default()).await.unwrap();
room.set_is_low_priority(true, None).await.unwrap();

// Mock the response from the server.
let tags = BTreeMap::from([(TagName::LowPriority, TagInfo::default())]);
Expand All @@ -221,7 +221,7 @@ async fn test_unset_low_priority() {
// Server will be called to unset the room as favourite.
mock_tag_api(&server, TagName::LowPriority, TagOperation::Remove, 1).await;

room.set_is_low_priority(false, Option::default()).await.unwrap();
room.set_is_low_priority(false, None).await.unwrap();

server.verify().await;
}

0 comments on commit 6a0333e

Please sign in to comment.