diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-09-15 13:04:03 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-09-17 21:28:52 +0800 |
| commit | b4faad42e862031617924d08de53a56bfe3b966e (patch) | |
| tree | cf80fd789f5a9a27fb1a38c5f43312878d048581 | |
| parent | f1a169bee9fd1f5a8995db0d588680d96d647937 (diff) | |
perf(client::cpu_arch): use static string slice instead of String
| -rw-r--r-- | src/client/client.rs | 4 |
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(), |
