aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-12-15 10:01:15 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-12-15 10:01:15 -0800
commit92b2ff1056152ac622a4313575b2f55b533c4e59 (patch)
tree2678a69ecf188ac1f40db5fd16f7da9a4929950c /src
parentbfbeea6b443f1eabcacfc7c63b614d516d5fa541 (diff)
parentcaa46155363be6281af27a089adde80dc453944e (diff)
downloadmilf-rs-92b2ff1056152ac622a4313575b2f55b533c4e59.tar.gz
milf-rs-92b2ff1056152ac622a4313575b2f55b533c4e59.zip
Merge pull request #79 from silvo38/master
Remove floats from the Decoder.toml field when they get parsed
Diffstat (limited to 'src')
-rw-r--r--src/decoder/rustc_serialize.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/decoder/rustc_serialize.rs b/src/decoder/rustc_serialize.rs
index 534154d..b84eeb9 100644
--- a/src/decoder/rustc_serialize.rs
+++ b/src/decoder/rustc_serialize.rs
@@ -57,7 +57,7 @@ impl rustc_serialize::Decoder for Decoder {
}
fn read_f64(&mut self) -> Result<f64, DecodeError> {
match self.toml {
- Some(Value::Float(f)) => Ok(f),
+ Some(Value::Float(f)) => { self.toml.take(); Ok(f) },
ref found => Err(self.mismatch("float", found)),
}
}