Skip to content

Commit b4c49ba

Browse files
committed
mod.rs docs fix - for floats
Same with integers — docs meant that Option is returned though the function returns Result.
1 parent c7697ee commit b4c49ba

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/libcore/num/mod.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -2705,8 +2705,8 @@ macro_rules! from_str_radix_float_impl {
27052705
///
27062706
/// # Return value
27072707
///
2708-
/// `None` if the string did not represent a valid number. Otherwise,
2709-
/// `Some(n)` where `n` is the floating-point number represented by `src`.
2708+
/// `Err(ParseIntError)` if the string did not represent a valid number. Otherwise,
2709+
/// Otherwise, `Ok(n)` where `n` is the floating-point number represented by `src`.
27102710
#[inline]
27112711
#[allow(deprecated)]
27122712
fn from_str(src: &str) -> Result<$T, ParseFloatError> {
@@ -2734,9 +2734,8 @@ macro_rules! from_str_radix_float_impl {
27342734
///
27352735
/// # Return value
27362736
///
2737-
/// `None` if the string did not represent a valid number.
2738-
/// Otherwise, `Some(n)` where `n` is the floating-point number
2739-
/// represented by `src`.
2737+
/// `Err(ParseIntError)` if the string did not represent a valid number. Otherwise,
2738+
/// Otherwise, `Ok(n)` where `n` is the floating-point number represented by `src`.
27402739
fn from_str_radix(src: &str, radix: u32)
27412740
-> Result<$T, ParseFloatError> {
27422741
use self::FloatErrorKind::*;

0 commit comments

Comments
 (0)