Closed
Description
This program prints Ok(0)
where I would expect an Err(..)
:
fn main() {
println!("{:?}", ".".parse::<f64>());
}
If I remember correctly, this behavior has been around since pre-1.0 but it would be good if someone who has multirust
available could verify that (at least for 1.0 final if earlier builds are harder to get).
Unfortunately even if we all agree that this behavior is wrong, it may not be worth the potential breakage to fix. For example, recent changes to the integer FromStr
format (allowing leading plus) did, surprisingly, break real code. It's quite possible that fixing this wart is not worth the risk.