We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ceil_char_boundary
1 parent 5142c8d commit 5b4eb33Copy full SHA for 5b4eb33
src/str.rs
@@ -32,6 +32,7 @@ fn find_char_midpoint(chars: &str) -> usize {
32
// We want to split near the midpoint, but we need to find an actual
33
// character boundary. So we look at the raw bytes, first scanning
34
// forward from the midpoint for a boundary, then trying backward.
35
+ // TODO (MSRV 1.91): use `str::ceil_char_boundary`, else `floor_...`.
36
let (left, right) = chars.as_bytes().split_at(mid);
37
match right.iter().copied().position(is_char_boundary) {
38
Some(i) => mid + i,
0 commit comments