summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2025-09-15 13:04:03 +0800
committerlittleblack111 <littleblack11111@gmail.com>2025-09-17 21:28:52 +0800
commitb4faad42e862031617924d08de53a56bfe3b966e (patch)
treecf80fd789f5a9a27fb1a38c5f43312878d048581
parentf1a169bee9fd1f5a8995db0d588680d96d647937 (diff)
perf(client::cpu_arch): use static string slice instead of String
-rw-r--r--src/client/client.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/client.rs b/src/client/client.rs
index 37128b3..c833550 100644
--- a/src/client/client.rs
+++ b/src/client/client.rs
@@ -11,7 +11,7 @@ pub struct Client<C: Connection> {
hostname: String,
device_name: String,
os: &'static str,
- cpu_arch: String,
+ cpu_arch: &'static str,
distro: String,
desktop_env: DesktopEnv,
username: String,
@@ -58,7 +58,7 @@ impl<C: Connection> Client<C> {
hostname: gethostname().into_string().unwrap_or_default(),
device_name: whoami::devicename(),
os: std::env::consts::OS,
- cpu_arch: std::env::consts::ARCH.to_string(),
+ cpu_arch: std::env::consts::ARCH,
distro: whoami::distro(),
desktop_env: whoami::desktop_env(),
username: whoami::username(),