Skip to content

Commit

Permalink
Fix regression in minimum supported Rust version
Browse files Browse the repository at this point in the history
A change in a previous commit bumped the MSRV to 1.70, which was
unintentional.
  • Loading branch information
cessen committed Nov 7, 2023
1 parent 34e2442 commit 7bb5259
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/chars.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub fn from_byte_idx(text: &str, byte_idx: usize) -> usize {
// Ensure the index is either a char boundary or is off the end of
// the text.
let mut i = byte_idx;
while bytes.get(i).is_some_and(is_trailing_byte) {
while Some(true) == bytes.get(i).map(is_trailing_byte) {
i -= 1;
}

Expand Down

0 comments on commit 7bb5259

Please sign in to comment.