mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-31 00:53:48 +00:00
Clean up &args[..]
, use more readable args.iter()
instead
This commit is contained in:
parent
3657d0936f
commit
207f64948f
@ -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;
|
||||||
|
@ -457,7 +457,7 @@ impl clean::GenericArgs {
|
|||||||
f.write_str("<")?;
|
f.write_str("<")?;
|
||||||
}
|
}
|
||||||
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(", ")?;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user