Skip to content

Commit

Permalink
Clippy: do not use lazy eval of str::len
Browse files Browse the repository at this point in the history
  • Loading branch information
dhardy committed Dec 9, 2021
1 parent d19a04f commit 7f2a9c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/kas-core/src/text/selection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ impl SelectionHelper {
let pos = start + index;
(pos >= range.end).then(|| pos)
})
.unwrap_or_else(|| string.len());
.unwrap_or(string.len());
} else {
start = text.find_line(range.start).map(|r| r.1.start).unwrap_or(0);
end = text
Expand Down

0 comments on commit 7f2a9c2

Please sign in to comment.