Skip to content

Commit 5a4b87a

Browse files
committed
Use char_indices() over chars().enumerate()
1 parent 6de2ffd commit 5a4b87a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/modules/external_editor/argument_tokenizer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub(super) fn tokenize(input: &str) -> Option<Vec<String>> {
1919
let mut force_value = false;
2020

2121
let mut tokens = vec![];
22-
for (i, c) in input.chars().enumerate() {
22+
for (i, c) in input.char_indices() {
2323
match state {
2424
State::Normal => {
2525
if c == '\\' {

0 commit comments

Comments
 (0)