Skip to content
This repository was archived by the owner on Dec 7, 2023. It is now read-only.

Commit c39c86c

Browse files
committed
lint with clippy
1 parent 3ea6582 commit c39c86c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/lib.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,9 @@ pub fn get_original_spans<S: AsRef<str>>(
167167
}
168168
// get the rightmost corresponding char
169169
let mut origr = None;
170-
for x in a2b[l..r].iter().rev() {
171-
if let Some(j) = x {
172-
origr = Some(j + 1);
173-
break;
174-
}
170+
for j in a2b[l..r].iter().rev().flatten() {
171+
origr = Some(j + 1);
172+
break;
175173
}
176174
// edge case: a token with empty string
177175
if l == r {

0 commit comments

Comments
 (0)