From 2a8eeadf5d16fa091d0f56ffd6e763af08eb2f92 Mon Sep 17 00:00:00 2001 From: xtqqczze <45661989+xtqqczze@users.noreply.github.com> Date: Mon, 16 Feb 2026 09:33:51 +0000 Subject: [PATCH] dircolors: use zip for cleaner iteration with 1-based index --- src/uu/dircolors/src/dircolors.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/uu/dircolors/src/dircolors.rs b/src/uu/dircolors/src/dircolors.rs index f704b2601..762a97253 100644 --- a/src/uu/dircolors/src/dircolors.rs +++ b/src/uu/dircolors/src/dircolors.rs @@ -364,8 +364,7 @@ where let mut state = ParseState::Global; let mut saw_colorterm_match = false; - for (num, line) in user_input.into_iter().enumerate() { - let num = num + 1; + for (num, line) in (1..).zip(user_input.into_iter()) { let line = line.borrow().purify(); if line.is_empty() { continue;