Skip to content

Commit

Permalink
Fix return type
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas committed Nov 3, 2023
1 parent 745731d commit 68ae8cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/unix/linux/cpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -842,13 +842,13 @@ pub(crate) fn get_vendor_id_and_brand() -> HashMap<usize, (String, String)> {
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)

Check failure on line 852 in src/unix/linux/cpu.rs

View workflow job for this annotation

GitHub Actions / Check stable / aarch64-unknown-linux-gnu

the trait bound `CpuArch: From<&String>` is not satisfied

Check failure on line 852 in src/unix/linux/cpu.rs

View workflow job for this annotation

GitHub Actions / Check stable / aarch64-linux-android

the trait bound `CpuArch: From<&String>` is not satisfied

Check failure on line 852 in src/unix/linux/cpu.rs

View workflow job for this annotation

GitHub Actions / Check nightly / aarch64-linux-android

the trait bound `CpuArch: From<&String>` is not satisfied

Check failure on line 852 in src/unix/linux/cpu.rs

View workflow job for this annotation

GitHub Actions / Check stable / arm-unknown-linux-gnueabihf

the trait bound `CpuArch: From<&String>` is not satisfied

Check failure on line 852 in src/unix/linux/cpu.rs

View workflow job for this annotation

GitHub Actions / Check nightly / aarch64-unknown-linux-gnu

the trait bound `CpuArch: From<&String>` is not satisfied

Check failure on line 852 in src/unix/linux/cpu.rs

View workflow job for this annotation

GitHub Actions / Check stable / aarch64-unknown-linux-musl

the trait bound `CpuArch: From<&String>` is not satisfied

Check failure on line 852 in src/unix/linux/cpu.rs

View workflow job for this annotation

GitHub Actions / Check nightly / aarch64-unknown-linux-musl

the trait bound `CpuArch: From<&String>` is not satisfied

Check failure on line 852 in src/unix/linux/cpu.rs

View workflow job for this annotation

GitHub Actions / Check nightly / arm-unknown-linux-gnueabihf

the trait bound `CpuArch: From<&String>` is not satisfied

Check failure on line 852 in src/unix/linux/cpu.rs

View workflow job for this annotation

GitHub Actions / Check stable / arm-unknown-linux-musleabihf

the trait bound `CpuArch: From<&String>` is not satisfied

Check failure on line 852 in src/unix/linux/cpu.rs

View workflow job for this annotation

GitHub Actions / Check stable / armv7-linux-androideabi

the trait bound `CpuArch: From<&String>` is not satisfied

Check failure on line 852 in src/unix/linux/cpu.rs

View workflow job for this annotation

GitHub Actions / Check nightly / armv7-linux-androideabi

the trait bound `CpuArch: From<&String>` is not satisfied

Check failure on line 852 in src/unix/linux/cpu.rs

View workflow job for this annotation

GitHub Actions / Check nightly / arm-unknown-linux-musleabihf

the trait bound `CpuArch: From<&String>` is not satisfied

Check failure on line 852 in src/unix/linux/cpu.rs

View workflow job for this annotation

GitHub Actions / Check stable / armv7-unknown-linux-gnueabihf

the trait bound `CpuArch: From<&String>` is not satisfied

Check failure on line 852 in src/unix/linux/cpu.rs

View workflow job for this annotation

GitHub Actions / Check stable / armv7-unknown-linux-musleabihf

the trait bound `CpuArch: From<&String>` is not satisfied

Check failure on line 852 in src/unix/linux/cpu.rs

View workflow job for this annotation

GitHub Actions / Check nightly / armv7-unknown-linux-musleabihf

the trait bound `CpuArch: From<&String>` is not satisfied

Check failure on line 852 in src/unix/linux/cpu.rs

View workflow job for this annotation

GitHub Actions / Check nightly / armv7-unknown-linux-gnueabihf

the trait bound `CpuArch: From<&String>` is not satisfied

Check failure on line 852 in src/unix/linux/cpu.rs

View workflow job for this annotation

GitHub Actions / Check nightly / i686-linux-android

the trait bound `CpuArch: From<&String>` is not satisfied

Check failure on line 852 in src/unix/linux/cpu.rs

View workflow job for this annotation

GitHub Actions / Check 1.65.0 / aarch64-linux-android

the trait bound `CpuArch: From<&String>` is not satisfied

Check failure on line 852 in src/unix/linux/cpu.rs

View workflow job for this annotation

GitHub Actions / Check 1.65.0 / aarch64-unknown-linux-musl

the trait bound `CpuArch: From<&String>` is not satisfied

Check failure on line 852 in src/unix/linux/cpu.rs

View workflow job for this annotation

GitHub Actions / Check stable / x86_64-unknown-linux-gnu

the trait bound `CpuArch: From<&String>` is not satisfied

Check failure on line 852 in src/unix/linux/cpu.rs

View workflow job for this annotation

GitHub Actions / Check stable / i686-unknown-linux-gnu

the trait bound `CpuArch: From<&String>` is not satisfied

Check failure on line 852 in src/unix/linux/cpu.rs

View workflow job for this annotation

GitHub Actions / Check nightly / x86_64-unknown-linux-gnu

the trait bound `CpuArch: From<&String>` is not satisfied

Check failure on line 852 in src/unix/linux/cpu.rs

View workflow job for this annotation

GitHub Actions / Check nightly / i686-unknown-linux-gnu

the trait bound `CpuArch: From<&String>` is not satisfied

Check failure on line 852 in src/unix/linux/cpu.rs

View workflow job for this annotation

GitHub Actions / Check stable / i686-linux-android

the trait bound `CpuArch: From<&String>` is not satisfied

Check failure on line 852 in src/unix/linux/cpu.rs

View workflow job for this annotation

GitHub Actions / Check nightly / x86_64-linux-android

the trait bound `CpuArch: From<&String>` is not satisfied

Check failure on line 852 in src/unix/linux/cpu.rs

View workflow job for this annotation

GitHub Actions / Check 1.65.0 / aarch64-unknown-linux-gnu

the trait bound `CpuArch: From<&String>` is not satisfied

Check failure on line 852 in src/unix/linux/cpu.rs

View workflow job for this annotation

GitHub Actions / Check stable / x86_64-linux-android

the trait bound `CpuArch: From<&String>` is not satisfied

Check failure on line 852 in src/unix/linux/cpu.rs

View workflow job for this annotation

GitHub Actions / Check 1.65.0 / arm-unknown-linux-musleabihf

the trait bound `CpuArch: From<&String>` is not satisfied

Check failure on line 852 in src/unix/linux/cpu.rs

View workflow job for this annotation

GitHub Actions / Check 1.65.0 / armv7-unknown-linux-gnueabihf

the trait bound `CpuArch: From<&String>` is not satisfied

Check failure on line 852 in src/unix/linux/cpu.rs

View workflow job for this annotation

GitHub Actions / Check 1.65.0 / arm-unknown-linux-gnueabihf

the trait bound `CpuArch: From<&String>` is not satisfied

Check failure on line 852 in src/unix/linux/cpu.rs

View workflow job for this annotation

GitHub Actions / Check 1.65.0 / armv7-linux-androideabi

the trait bound `CpuArch: From<&String>` is not satisfied

Check failure on line 852 in src/unix/linux/cpu.rs

View workflow job for this annotation

GitHub Actions / Check 1.65.0 / armv7-unknown-linux-musleabihf

the trait bound `CpuArch: From<&String>` is not satisfied

Check failure on line 852 in src/unix/linux/cpu.rs

View workflow job for this annotation

GitHub Actions / Check 1.65.0 / x86_64-unknown-linux-gnu

the trait bound `CpuArch: From<&String>` is not satisfied

Check failure on line 852 in src/unix/linux/cpu.rs

View workflow job for this annotation

GitHub Actions / Check 1.65.0 / i686-linux-android

the trait bound `CpuArch: From<&String>` is not satisfied

Check failure on line 852 in src/unix/linux/cpu.rs

View workflow job for this annotation

GitHub Actions / Check 1.65.0 / i686-unknown-linux-gnu

the trait bound `CpuArch: From<&String>` is not satisfied
}
}

0 comments on commit 68ae8cd

Please sign in to comment.