aboutsummaryrefslogtreecommitdiff
path: root/src/serialization.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-10-31 08:27:24 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-10-31 08:27:24 -0700
commit71d1689d63ef1af41addef330e314a56e88f48a9 (patch)
treea6aee64ac17b02166496c2082f6f995de592108b /src/serialization.rs
parent7b2aa23dbdf21dcd4fa34e5ac2d58cba06b19dff (diff)
downloadmilf-rs-71d1689d63ef1af41addef330e314a56e88f48a9.tar.gz
milf-rs-71d1689d63ef1af41addef330e314a56e88f48a9.zip
Update to rust master
Diffstat (limited to 'src/serialization.rs')
-rw-r--r--src/serialization.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/serialization.rs b/src/serialization.rs
index 2573f5f..afaa425 100644
--- a/src/serialization.rs
+++ b/src/serialization.rs
@@ -639,14 +639,14 @@ impl serialize::Decoder<DecodeError> for Decoder {
-> Result<T, DecodeError>
{
let toml = match self.toml {
- Some(Array(ref mut arr)) => mem::replace(arr.get_mut(idx), Integer(0)),
+ Some(Array(ref mut arr)) => mem::replace(&mut arr[idx], Integer(0)),
ref found => return Err(self.mismatch("array", found)),
};
let mut d = self.sub_decoder(Some(toml), "");
let ret = try!(f(&mut d));
match d.toml {
Some(toml) => match self.toml {
- Some(Array(ref mut arr)) => *arr.get_mut(idx) = toml,
+ Some(Array(ref mut arr)) => arr[idx] = toml,
_ => {}
},
_ => {}