mirror of
https://github.com/uutils/coreutils.git
synced 2025-12-23 08:47:37 +00:00
refactor(wc): simplify SIMD feature collection in debug output
- Changed multi-line SIMD feature vector creation to a single-line expression for improved readability and consistency with surrounding code. - No functional changes; only stylistic refactoring in the wc debug logic.
This commit is contained in:
parent
15eacb6f8e
commit
a61c191b68
1 changed files with 2 additions and 4 deletions
|
|
@ -840,10 +840,8 @@ fn wc(inputs: &Inputs, settings: &Settings) -> UResult<()> {
|
|||
if settings.debug {
|
||||
let policy = SimdPolicy::detect();
|
||||
if policy.allows_simd() {
|
||||
let enabled: Vec<&'static str> = policy
|
||||
.iter_features()
|
||||
.map(hardware_feature_label)
|
||||
.collect();
|
||||
let enabled: Vec<&'static str> =
|
||||
policy.iter_features().map(hardware_feature_label).collect();
|
||||
if enabled.is_empty() {
|
||||
eprintln!("{}", translate!("wc-debug-hw-unavailable"));
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue