We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ecc989 commit 4e8afd6Copy full SHA for 4e8afd6
src/libcore/str/mod.rs
@@ -44,8 +44,11 @@ pub trait FromStr {
44
#[stable(feature = "rust1", since = "1.0.0")]
45
type Err;
46
47
- /// Parses a string `s` to return an optional value of this type. If the
48
- /// string is ill-formatted, the None is returned.
+ /// Parses a string `s` to return a value of this type.
+ ///
49
+ /// If parsing succeeds, return the value inside `Ok`, otherwise
50
+ /// when the string is ill-formatted return an error specific to the
51
+ /// inside `Err`. The error type is specific to implementation of the trait.
52
53
fn from_str(s: &str) -> Result<Self, Self::Err>;
54
}
0 commit comments