aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2017-02-21 20:27:43 -0800
committerAlex Crichton <alex@alexcrichton.com>2017-02-21 20:27:43 -0800
commitd39c3f7b3ec95cb3cc1e579d7d747206c66aab74 (patch)
treebcf55a3a5f0dc7d57f8a715823e916d42799e123 /src
parent3b7494cf501c6e18b249977c7f0d56654c5e381c (diff)
downloadmilf-rs-d39c3f7b3ec95cb3cc1e579d7d747206c66aab74.tar.gz
milf-rs-d39c3f7b3ec95cb3cc1e579d7d747206c66aab74.zip
Relax assertions in substr_offset slightly
Closes #152
Diffstat (limited to 'src')
-rw-r--r--src/tokens.rs2
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);