]> git.lizzy.rs Git - rust.git/commitdiff
Fix theme-checker failure
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Sat, 25 May 2019 12:32:24 +0000 (14:32 +0200)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Thu, 20 Jun 2019 20:59:56 +0000 (22:59 +0200)
src/librustdoc/theme.rs

index 7a0ccf6975f8c23fe0e00b73054d6d27d44978de..b3196217adc4dc80d9a3e1db93181c2b9459fe98 100644 (file)
@@ -110,7 +110,7 @@ fn load_css_events(v: &[u8]) -> Vec<Events> {
     let mut pos = 0;
     let mut events = Vec::with_capacity(100);
 
-    while pos < v.len() - 1 {
+    while pos + 1 < v.len() {
         match v[pos] {
             b'/' if pos + 1 < v.len() && v[pos + 1] == b'*' => {
                 events.push(Events::StartComment(pos));