diff options
author | Cameron Silvestrini <cameron@silvestrini.com.au> | 2015-12-15 22:43:24 +1100 |
---|---|---|
committer | Cameron Silvestrini <cameron@silvestrini.com.au> | 2015-12-15 22:43:24 +1100 |
commit | caa46155363be6281af27a089adde80dc453944e (patch) | |
tree | 2678a69ecf188ac1f40db5fd16f7da9a4929950c | |
parent | bfbeea6b443f1eabcacfc7c63b614d516d5fa541 (diff) | |
download | milf-rs-caa46155363be6281af27a089adde80dc453944e.tar.gz milf-rs-caa46155363be6281af27a089adde80dc453944e.zip |
Fixed bug: floats always end up in Decoder.toml, even when they have
been successfully decoded.
-rw-r--r-- | src/decoder/rustc_serialize.rs | 2 |
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)), } } |