Fixed bug: floats always end up in Decoder.toml, even when they have
been successfully decoded.
This commit is contained in:
parent
bfbeea6b44
commit
caa4615536
|
@ -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)),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue