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

Commit

Permalink
lint with clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
tamuhey committed Jul 20, 2021
1 parent c39c86c commit 5967a6e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,7 @@ pub fn get_original_spans<S: AsRef<str>>(
}
}
// get the rightmost corresponding char
let mut origr = None;
for j in a2b[l..r].iter().rev().flatten() {
origr = Some(j + 1);
break;
}
let mut origr = a2b[l..r].iter().rev().flatten().next().map(|j| j + 1);
// edge case: a token with empty string
if l == r {
if l >= a2b.len() {
Expand Down

0 comments on commit 5967a6e

Please sign in to comment.