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.
1 parent 16e6b0a commit 44bf92bCopy full SHA for 44bf92b
library/core/src/iter/range.rs
@@ -526,10 +526,11 @@ impl Step for char {
526
}
527
528
#[requires({
529
- let dist = (start as u32).checked_sub(count as u32);
530
- dist.is_some() &&
531
- ((start as u32) < 0xE000 || dist.unwrap() >= 0xE000 ||
532
- dist.unwrap().checked_sub(0x800).is_some())
+ (start as u32).checked_sub(count as u32).is_some_and(|dist|
+ (start as u32) < 0xE000 ||
+ dist >= 0xE000 ||
+ dist.checked_sub(0x800).is_some()
533
+ )
534
})]
535
#[inline]
536
unsafe fn backward_unchecked(start: char, count: usize) -> char {
0 commit comments