Skip to content

Commit c7697ee

Browse files
committed
mod.rs docs fix
Docs meant that Option is returned though the function returns Result.
1 parent 9539627 commit c7697ee

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/libcore/num/mod.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -856,9 +856,8 @@ macro_rules! int_impl {
856856
///
857857
/// # Return value
858858
///
859-
/// `None` if the string did not represent a valid number.
860-
/// Otherwise, `Some(n)` where `n` is the integer represented
861-
/// by `src`.
859+
/// `Err(ParseIntError)` if the string did not represent a valid number.
860+
/// Otherwise, `Ok(n)` where `n` is the integer represented by `src`.
862861
#[stable(feature = "rust1", since = "1.0.0")]
863862
#[allow(deprecated)]
864863
pub fn from_str_radix(src: &str, radix: u32) -> Result<$T, ParseIntError> {
@@ -1374,9 +1373,8 @@ macro_rules! uint_impl {
13741373
///
13751374
/// # Return value
13761375
///
1377-
/// `None` if the string did not represent a valid number.
1378-
/// Otherwise, `Some(n)` where `n` is the integer represented
1379-
/// by `src`.
1376+
/// `Err(ParseIntError)` if the string did not represent a valid number.
1377+
/// Otherwise, `Ok(n)` where `n` is the integer represented by `src`.
13801378
#[stable(feature = "rust1", since = "1.0.0")]
13811379
#[allow(deprecated)]
13821380
pub fn from_str_radix(src: &str, radix: u32) -> Result<$T, ParseIntError> {

0 commit comments

Comments
 (0)