Fix unnecessary ref and & in patterns
@@ -113,21 +113,21 @@ impl Serialize for Content {
}
Content::Map(ref entries) => {
let mut map = serializer.serialize_map(Some(entries.len()))?;
- for &(ref k, ref v) in entries {
+ for (k, v) in entries {
map.serialize_entry(k, v)?;
}
map.end()
}
Content::Struct(n, ref fields) => {
let mut s = serializer.serialize_struct(n, fields.len())?;
- for &(k, ref v) in fields {
+ for (k, v) in fields {
s.serialize_field(k, v)?;
}
s.end()
}
Content::StructVariant(n, i, v, ref fields) => {
let mut sv = serializer.serialize_struct_variant(n, i, v, fields.len())?;
- for &(k, ref v) in fields {
+ for (k, v) in fields {
sv.serialize_field(k, v)?;
}
sv.end()
