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