Replace full slice notation with index calls

This commit is contained in:
Nick Cameron
2015-01-02 13:56:28 +13:00
parent 918255ef8c
commit f7ff37e4c5
225 changed files with 2166 additions and 2139 deletions

View File

@@ -311,7 +311,7 @@ fn path<F, G>(w: &mut fmt::Formatter,
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.index(&(0..amt)).iter() {
if "super" == seg.name ||
"self" == seg.name {
try!(write!(w, "{}::", seg.name));
@@ -326,7 +326,7 @@ fn path<F, G>(w: &mut fmt::Formatter,
}
}
None => {
for seg in path.segments[..amt].iter() {
for seg in path.segments.index(&(0..amt)).iter() {
try!(write!(w, "{}::", seg.name));
}
}