From 3180b895227563e3aaed33ab922d19f790efda4b Mon Sep 17 00:00:00 2001 From: alxndrv <> Date: Mon, 17 Feb 2025 16:40:08 +0200 Subject: [PATCH] `lscpu`: Fix minor issues from review --- src/uu/lscpu/src/sysfs.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/uu/lscpu/src/sysfs.rs b/src/uu/lscpu/src/sysfs.rs index 2e1409d..462e536 100644 --- a/src/uu/lscpu/src/sysfs.rs +++ b/src/uu/lscpu/src/sysfs.rs @@ -1,3 +1,8 @@ +// This file is part of the uutils util-linux package. +// +// For the full copyright and license information, please view the LICENSE +// file that was distributed with this source code. + use std::{collections::HashSet, fs, path::PathBuf}; pub struct CpuVulnerability { @@ -92,7 +97,7 @@ impl CacheSize { const EXPONENTS: [(char, u32); 4] = [('K', 1), ('M', 2), ('G', 3), ('T', 4)]; // If we only have numbers, treat it as a raw amount of bytes and parse as-is - if s.chars().all(|c| c.is_numeric()) { + if s.chars().all(char::is_numeric) { return Self(s.parse::().expect("Could not parse cache size")); };