]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/html/escape.rs
Fallout from stabilization.
[rust.git] / src / librustdoc / html / escape.rs
index 6fb78d9a8334b285ad09cbc74445bd0912d1c8ab..db7253c9ef3dd6bae519674f0f6898f4942ef79a 100644 (file)
@@ -29,7 +29,7 @@ fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
         for (i, ch) in s.bytes().enumerate() {
             match ch as char {
                 '<' | '>' | '&' | '\'' | '"' => {
-                    try!(fmt.write_str(pile_o_bits.slice(last, i)));
+                    try!(fmt.write_str(&pile_o_bits[last.. i]));
                     let s = match ch as char {
                         '>' => "&gt;",
                         '<' => "&lt;",
@@ -46,7 +46,7 @@ fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
         }
 
         if last < s.len() {
-            try!(fmt.write_str(pile_o_bits.slice_from(last)));
+            try!(fmt.write_str(&pile_o_bits[last..]));
         }
         Ok(())
     }