Skip to content

parsing "0" with implicit octal enabled results in an error

With implicit octal support enabled, the following code

println!("{:?}", parse::<u32>("0"));

Will return:

Err(ParseIntError { kind: Empty })

While returning Result<0> would be the expected behaviour I guess?