Skip to content

Commit

Permalink
docs: Update FromStr documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulrik Sverdrup committed May 10, 2015
1 parent 6cd7486 commit 00f2157
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/libcore/str/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,11 @@ pub trait FromStr {
#[stable(feature = "rust1", since = "1.0.0")]
type Err;

/// Parses a string `s` to return an optional value of this type. If the
/// string is ill-formatted, the None is returned.
/// Parses a string `s` to return a value of this type.
///
/// If parsing succeeds, return the value inside `Ok`, otherwise
/// when the string is ill-formatted return an error specific to the
/// inside `Err`. The error type is specific to implementation of the trait.
#[stable(feature = "rust1", since = "1.0.0")]
fn from_str(s: &str) -> Result<Self, Self::Err>;
}
Expand Down

0 comments on commit 00f2157

Please sign in to comment.