Merge pull request #79 from silvo38/master

Remove floats from the Decoder.toml field when they get parsed
This commit is contained in:
Alex Crichton 2015-12-15 10:01:15 -08:00
commit 92b2ff1056

View file

@ -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)),
}
}