Clean up &args[..], use more readable args.iter() instead

This commit is contained in:
Michael Howell 2022-05-22 15:03:51 -07:00
parent 3657d0936f
commit 207f64948f
2 changed files with 4 additions and 4 deletions

View File

@ -1205,7 +1205,7 @@ impl Clean<Item> for ty::AssocItem {
|| generics || generics
.params .params
.iter() .iter()
.zip(&args[..]) .zip(args.iter())
.any(|(param, arg)| !param_eq_arg(param, arg)) .any(|(param, arg)| !param_eq_arg(param, arg))
{ {
return false; return false;

View File

@ -457,7 +457,7 @@ impl clean::GenericArgs {
f.write_str("&lt;")?; f.write_str("&lt;")?;
} }
let mut comma = false; let mut comma = false;
for arg in &args[..] { for arg in args.iter() {
if comma { if comma {
f.write_str(", ")?; f.write_str(", ")?;
} }
@ -468,7 +468,7 @@ impl clean::GenericArgs {
write!(f, "{}", arg.print(cx))?; write!(f, "{}", arg.print(cx))?;
} }
} }
for binding in &bindings[..] { for binding in bindings.iter() {
if comma { if comma {
f.write_str(", ")?; f.write_str(", ")?;
} }
@ -489,7 +489,7 @@ impl clean::GenericArgs {
clean::GenericArgs::Parenthesized { inputs, output } => { clean::GenericArgs::Parenthesized { inputs, output } => {
f.write_str("(")?; f.write_str("(")?;
let mut comma = false; let mut comma = false;
for ty in &inputs[..] { for ty in inputs.iter() {
if comma { if comma {
f.write_str(", ")?; f.write_str(", ")?;
} }