Skip to content

Commit 7d13bd6

Browse files
Copilotbnjbvr
andcommitted
fix: Replace to_string() with to_owned() for string literals to resolve clippy warnings
Co-authored-by: bnjbvr <1180019+bnjbvr@users.noreply.github.com>
1 parent d81a541 commit 7d13bd6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • crates/matrix-sdk/src/client

‎crates/matrix-sdk/src/client/mod.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -555,8 +555,8 @@ impl Client {
555555

556556
// Extract server info, using defaults if fields are missing.
557557
let server = res.server.unwrap_or_default();
558-
let server_name_str = server.name.unwrap_or_else(|| "unknown".to_string());
559-
let version = server.version.unwrap_or_else(|| "unknown".to_string());
558+
let server_name_str = server.name.unwrap_or_else(|| "unknown".to_owned());
559+
let version = server.version.unwrap_or_else(|| "unknown".to_owned());
560560

561561
Ok(ServerVendorInfo { server_name: server_name_str, version })
562562
}

0 commit comments

Comments
 (0)