Skip to content

Commit 8012acc

Browse files
committed
Use a from
1 parent 84a6cb3 commit 8012acc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/line-index/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ impl LineIndex {
161161
let mut res: usize = col.into();
162162
if let Some(wide_chars) = self.line_wide_chars.get(&line_col.line) {
163163
for c in wide_chars.iter() {
164-
if c.end <= col {
164+
if u32::from(c.end) <= line_col.col {
165165
res -= usize::from(c.len()) - c.wide_len(enc);
166166
} else {
167167
// From here on, all utf16 characters come *after* the character we are mapping,

0 commit comments

Comments
 (0)