Skip to content

Commit 207f649

Browse files
committed
Clean up &args[..], use more readable args.iter() instead
1 parent 3657d09 commit 207f649

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/librustdoc/clean/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1205,7 +1205,7 @@ impl Clean<Item> for ty::AssocItem {
12051205
|| generics
12061206
.params
12071207
.iter()
1208-
.zip(&args[..])
1208+
.zip(args.iter())
12091209
.any(|(param, arg)| !param_eq_arg(param, arg))
12101210
{
12111211
return false;

src/librustdoc/html/format.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ impl clean::GenericArgs {
457457
f.write_str("&lt;")?;
458458
}
459459
let mut comma = false;
460-
for arg in &args[..] {
460+
for arg in args.iter() {
461461
if comma {
462462
f.write_str(", ")?;
463463
}
@@ -468,7 +468,7 @@ impl clean::GenericArgs {
468468
write!(f, "{}", arg.print(cx))?;
469469
}
470470
}
471-
for binding in &bindings[..] {
471+
for binding in bindings.iter() {
472472
if comma {
473473
f.write_str(", ")?;
474474
}
@@ -489,7 +489,7 @@ impl clean::GenericArgs {
489489
clean::GenericArgs::Parenthesized { inputs, output } => {
490490
f.write_str("(")?;
491491
let mut comma = false;
492-
for ty in &inputs[..] {
492+
for ty in inputs.iter() {
493493
if comma {
494494
f.write_str(", ")?;
495495
}

0 commit comments

Comments
 (0)