Support older rustc.

This commit is contained in:
Eric Huss 2018-07-11 00:13:47 -07:00
parent 6d76b19b58
commit e0a820be2f

View file

@ -1179,12 +1179,12 @@ impl<'a> Deserializer<'a> {
values.push((key, value)); values.push((key, value));
return Ok(()); return Ok(());
} }
match values.iter_mut().find(|(k, _)| *k == key) { match values.iter_mut().find(|&&mut (ref k, _)| *k == key) {
Some((_, Value { e: E::InlineTable(ref mut v), .. })) => { Some(&mut (_, Value { e: E::InlineTable(ref mut v), .. })) => {
return self.add_dotted_key(key_parts, value, v); return self.add_dotted_key(key_parts, value, v);
} }
Some((_, Value { start, .. })) => { Some(&mut (_, Value { start, .. })) => {
return Err(self.error(*start, ErrorKind::DottedKeyInvalidType)); return Err(self.error(start, ErrorKind::DottedKeyInvalidType));
} }
None => {} None => {}
} }