Skip to content

Commit e188d0b

Browse files
committed
sh: collapse nested if
1 parent 3c83c6a commit e188d0b

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

sh/src/wordexp/mod.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,12 @@ fn split_generated_unquoted_literal(
6262
None => break 'outer,
6363
}
6464
}
65+
} else if let Some(c) = iter.next() {
66+
next_char = c;
6567
} else {
66-
if let Some(c) = iter.next() {
67-
next_char = c;
68-
} else {
69-
break;
70-
}
68+
break;
7169
}
70+
7271
if !accumulator.is_empty() {
7372
last_word.append(accumulator, false, false);
7473
accumulator = String::new();

0 commit comments

Comments
 (0)