diff options
| author | Aaron Turon <aturon@mozilla.com> | 2014-10-02 11:48:07 -0700 |
|---|---|---|
| committer | Aaron Turon <aturon@mozilla.com> | 2014-10-02 11:48:07 -0700 |
| commit | d2ea0315e09cbd495a67c9e3d5053b57e2b5a8b7 (patch) | |
| tree | d39de6be5866c0f0f37f9f3219b8217c873d8b52 /src/librustdoc/html/format.rs | |
| parent | c0c6c895890770d7029324fd9b592f42e0564e8b (diff) | |
| download | rust-d2ea0315e09cbd495a67c9e3d5053b57e2b5a8b7.tar.gz rust-d2ea0315e09cbd495a67c9e3d5053b57e2b5a8b7.zip | |
Revert "Use slice syntax instead of slice_to, etc."
This reverts commit 40b9f5ded50ac4ce8c9323921ec556ad611af6b7.
Diffstat (limited to 'src/librustdoc/html/format.rs')
| -rw-r--r-- | src/librustdoc/html/format.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs index b52b34ff581..947d9f05ae2 100644 --- a/src/librustdoc/html/format.rs +++ b/src/librustdoc/html/format.rs @@ -249,7 +249,7 @@ fn path(w: &mut fmt::Formatter, path: &clean::Path, print_all: bool, match rel_root { Some(root) => { let mut root = String::from_str(root.as_slice()); - for seg in path.segments[..amt].iter() { + for seg in path.segments.slice_to(amt).iter() { if "super" == seg.name.as_slice() || "self" == seg.name.as_slice() { try!(write!(w, "{}::", seg.name)); @@ -264,7 +264,7 @@ fn path(w: &mut fmt::Formatter, path: &clean::Path, print_all: bool, } } None => { - for seg in path.segments[..amt].iter() { + for seg in path.segments.slice_to(amt).iter() { try!(write!(w, "{}::", seg.name)); } } @@ -275,7 +275,7 @@ fn path(w: &mut fmt::Formatter, path: &clean::Path, print_all: bool, // This is a documented path, link to it! Some((ref fqp, shortty)) if abs_root.is_some() => { let mut url = String::from_str(abs_root.unwrap().as_slice()); - let to_link = fqp[..fqp.len() - 1]; + let to_link = fqp.slice_to(fqp.len() - 1); for component in to_link.iter() { url.push_str(component.as_slice()); url.push_str("/"); |
