fix: find decoration spans in bidi text #933
Annotations
1 warning
|
the loop variable `i` is used to index `span_words`:
src/shape.rs#L2787
warning: the loop variable `i` is used to index `span_words`
--> src/shape.rs:2787:30
|
2787 | for i in r.start.word..r.end.word + usize::from(r.end.glyph != 0) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#needless_range_loop
= note: `#[warn(clippy::needless_range_loop)]` on by default
help: consider using an iterator and enumerate()
|
2787 - for i in r.start.word..r.end.word + usize::from(r.end.glyph != 0) {
2787 + for (i, <item>) in span_words.iter().enumerate().take(r.end.word + usize::from(r.end.glyph != 0)).skip(r.start.word) {
|
|