Skip to content

Commit 276b6d7

Browse files
committed
clippy: fix errors found locally
We should investigate why some errors were not found in CI tasks, though.
1 parent adff571 commit 276b6d7

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

bindings/matrix-sdk-ffi/src/client_builder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ impl ClientBuilder {
425425
random_dir
426426
.to_str()
427427
.expect("The base path and the uuid both are valid UTF-8 strings")
428-
.to_string(),
428+
.to_owned(),
429429
);
430430

431431
Some((base_directory, random_dir))

crates/matrix-sdk-base/src/sliding_sync.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1296,11 +1296,11 @@ mod tests {
12961296
room.heroes = Some(vec![
12971297
assign!(v4::SlidingSyncRoomHero::default(), {
12981298
user_id: Some(gordon),
1299-
name: Some("Gordon".to_string()),
1299+
name: Some("Gordon".to_owned()),
13001300
}),
13011301
assign!(v4::SlidingSyncRoomHero::default(), {
13021302
user_id: Some(alice),
1303-
name: Some("Alice".to_string()),
1303+
name: Some("Alice".to_owned()),
13041304
}),
13051305
]);
13061306
let response = response_with_room(room_id, room).await;
@@ -1315,7 +1315,7 @@ mod tests {
13151315
// And heroes are part of the summary.
13161316
assert_eq!(
13171317
client_room.clone_info().summary.heroes(),
1318-
&["@gordon:e.uk".to_string(), "@alice:e.uk".to_string()]
1318+
&["@gordon:e.uk".to_owned(), "@alice:e.uk".to_owned()]
13191319
);
13201320
}
13211321

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,10 @@ macro_rules! sliding_sync_then_assert_request_and_fake_response {
122122
&json!({ $( $request_json )* }),
123123
$crate::sliding_sync_then_assert_request_and_fake_response!(@assertion_config $sign)
124124
) {
125-
dbg!(json_value);
125+
#[allow(clippy::dbg_macro)]
126+
{
127+
dbg!(json_value);
128+
}
126129
panic!("{error}");
127130
}
128131

0 commit comments

Comments
 (0)