diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/tokens.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tokens.rs b/src/tokens.rs index 26c8277..ec7bb08 100644 --- a/src/tokens.rs +++ b/src/tokens.rs @@ -380,7 +380,7 @@ impl<'a> Tokenizer<'a> { } pub fn substr_offset(&self, s: &'a str) -> usize { - assert!(s.len() < self.input.len()); + assert!(s.len() <= self.input.len()); let a = self.input.as_ptr() as usize; let b = s.as_ptr() as usize; assert!(a <= b); |