diff --git a/src/unix/linux/cpu.rs b/src/unix/linux/cpu.rs index d4692b717..47b3ff19c 100644 --- a/src/unix/linux/cpu.rs +++ b/src/unix/linux/cpu.rs @@ -842,13 +842,13 @@ pub(crate) fn get_vendor_id_and_brand() -> HashMap { cpus } -fn get_cpu_arch() -> String { +fn get_cpu_arch() -> CpuArch { let mut s = String::new(); if let Err(_e) = File::open("/proc/sys/kernel/arch").and_then(|mut f| f.read_to_string(&mut s)) { sysinfo_debug!("Cannot read `/proc/sys/kernel/arch` file: {:?}", _e); CpuArch::UNKNOWN } else { - CpuArch::from(s) + CpuArch::from(&s) } }