]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/html/render.rs
Fallout from stabilization.
[rust.git] / src / librustdoc / html / render.rs
index ab9700d966aa525a9772dfbd09b3c4dddc42eb64..ea535a1490b06a1108931ed931193a279771c2e0 100644 (file)
@@ -749,7 +749,7 @@ fn emit_source(&mut self, filename: &str) -> io::IoResult<()> {
 
         // Remove the utf-8 BOM if any
         let contents = if contents.starts_with("\u{feff}") {
-            contents.slice_from(3)
+            &contents[3..]
         } else {
             contents
         };
@@ -1469,7 +1469,7 @@ fn full_path(cx: &Context, item: &clean::Item) -> String {
 fn shorter<'a>(s: Option<&'a str>) -> &'a str {
     match s {
         Some(s) => match s.find_str("\n\n") {
-            Some(pos) => s.slice_to(pos),
+            Some(pos) => &s[..pos],
             None => s,
         },
         None => ""