From b4faad42e862031617924d08de53a56bfe3b966e Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Mon, 15 Sep 2025 13:04:03 +0800 Subject: perf(client::cpu_arch): use static string slice instead of String --- src/client/client.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/client/client.rs') 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 { 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 Client { 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(), -- cgit v1.2.3