diff options
| author | Oak <White-Oak@users.noreply.github.com> | 2015-04-10 23:20:40 +0400 |
|---|---|---|
| committer | Oak <White-Oak@users.noreply.github.com> | 2015-04-10 23:20:40 +0400 |
| commit | b4c49ba2127a1bf0457cabf110a7389928be6488 (patch) | |
| tree | 869a83cb0f8c5a3079b3c732f6c6c34f455762b0 /src/libcore/num | |
| parent | c7697ee86dea35e2be3476c10cc4d9fe48ff7859 (diff) | |
| download | rust-b4c49ba2127a1bf0457cabf110a7389928be6488.tar.gz rust-b4c49ba2127a1bf0457cabf110a7389928be6488.zip | |
mod.rs docs fix - for floats
Same with integers — docs meant that Option is returned though the function returns Result.
Diffstat (limited to 'src/libcore/num')
| -rw-r--r-- | src/libcore/num/mod.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index b826609bb7d..8d3b780b1b3 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -2705,8 +2705,8 @@ macro_rules! from_str_radix_float_impl { /// /// # Return value /// - /// `None` if the string did not represent a valid number. Otherwise, - /// `Some(n)` where `n` is the floating-point number represented by `src`. + /// `Err(ParseIntError)` if the string did not represent a valid number. Otherwise, + /// Otherwise, `Ok(n)` where `n` is the floating-point number represented by `src`. #[inline] #[allow(deprecated)] fn from_str(src: &str) -> Result<$T, ParseFloatError> { @@ -2734,9 +2734,8 @@ macro_rules! from_str_radix_float_impl { /// /// # Return value /// - /// `None` if the string did not represent a valid number. - /// Otherwise, `Some(n)` where `n` is the floating-point number - /// represented by `src`. + /// `Err(ParseIntError)` if the string did not represent a valid number. Otherwise, + /// Otherwise, `Ok(n)` where `n` is the floating-point number represented by `src`. fn from_str_radix(src: &str, radix: u32) -> Result<$T, ParseFloatError> { use self::FloatErrorKind::*; |
