Skip to content

Commit e477de9

Browse files
committed
Use starts_with for legacy arg digit check
1 parent bf7a8ab commit e477de9

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/uu/sort/src/sort.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,11 +1201,7 @@ where
12011201

12021202
if let Some(next_str) = next_candidate {
12031203
if let Some(stripped) = next_str.strip_prefix('-') {
1204-
if stripped
1205-
.as_bytes()
1206-
.first()
1207-
.is_some_and(|c| c.is_ascii_digit())
1208-
{
1204+
if stripped.starts_with(|c: char| c.is_ascii_digit()) {
12091205
let next_arg = iter.next().unwrap();
12101206
if let Some(parsed) = parse_legacy_part(stripped) {
12111207
to_part = Some(parsed);

0 commit comments

Comments
 (0)