cleanup: &foo[0..a] -> &foo[..a]

This commit is contained in:
Jorge Aparicio
2015-01-12 16:59:18 -05:00
parent 3a44a19af2
commit c1d48a8508
44 changed files with 104 additions and 105 deletions

View File

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