From e0a820be2f8a0572d9d95cc5eea95005f7bec886 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Wed, 11 Jul 2018 00:13:47 -0700 Subject: [PATCH] Support older rustc. --- src/de.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/de.rs b/src/de.rs index d41ca12..65632fc 100644 --- a/src/de.rs +++ b/src/de.rs @@ -1179,12 +1179,12 @@ impl<'a> Deserializer<'a> { values.push((key, value)); return Ok(()); } - match values.iter_mut().find(|(k, _)| *k == key) { - Some((_, Value { e: E::InlineTable(ref mut v), .. })) => { + match values.iter_mut().find(|&&mut (ref k, _)| *k == key) { + Some(&mut (_, Value { e: E::InlineTable(ref mut v), .. })) => { return self.add_dotted_key(key_parts, value, v); } - Some((_, Value { start, .. })) => { - return Err(self.error(*start, ErrorKind::DottedKeyInvalidType)); + Some(&mut (_, Value { start, .. })) => { + return Err(self.error(start, ErrorKind::DottedKeyInvalidType)); } None => {} }