Fix clippy lint about looping over iter()

This commit is contained in:
David Tolnay
2016-08-03 19:32:51 -07:00
parent b289edd4a4
commit d0502b93ef
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -382,7 +382,7 @@ fn serialize_variant(
}
Style::Struct => {
let mut pat = builder.pat().struct_().id(type_ident).id(variant_ident).build();
for field in variant.fields.iter() {
for field in &variant.fields {
let name = match field.ident {
Some(name) => name,
None => cx.span_bug(field.span, "struct variant has unnamed fields"),