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.
MAX
max_value()
1 parent 2cc6889 commit 53bce57Copy full SHA for 53bce57
src/common.rs
@@ -28,7 +28,8 @@ impl<'a> AsciiStr<'a> {
28
#[inline]
29
pub unsafe fn step_by(&mut self, n: usize) -> &mut Self {
30
debug_assert!(
31
- n < isize::MAX as usize && n as isize <= self.len(),
+ // FIXME: remove when we drop support for < 1.43.0
32
+ n < isize::max_value() as usize && n as isize <= self.len(),
33
"buffer overflow: stepping by greater than our buffer length."
34
);
35
// SAFETY: Safe if `n <= self.len()`
0 commit comments