diff options
| author | Corey Richardson <corey@octayn.net> | 2013-09-05 00:58:12 -0400 |
|---|---|---|
| committer | Corey Richardson <corey@octayn.net> | 2013-09-05 00:58:12 -0400 |
| commit | c1c5c8b725165546a5a2b158ad46888aee5df241 (patch) | |
| tree | b443b1d32b04b1a97f8a696d68193a43269e01e6 /src/libstd/from_str.rs | |
| parent | be43625082bf14f7ca49c9edc4b8a899fd73eddf (diff) | |
| download | rust-c1c5c8b725165546a5a2b158ad46888aee5df241.tar.gz rust-c1c5c8b725165546a5a2b158ad46888aee5df241.zip | |
Add from_str docs
Diffstat (limited to 'src/libstd/from_str.rs')
| -rw-r--r-- | src/libstd/from_str.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libstd/from_str.rs b/src/libstd/from_str.rs index a2417ae70cc..e5bf9f6bb2a 100644 --- a/src/libstd/from_str.rs +++ b/src/libstd/from_str.rs @@ -20,6 +20,7 @@ pub trait FromStr { fn from_str(s: &str) -> Option<Self>; } +/// A utility function that just calls FromStr::from_str pub fn from_str<A: FromStr>(s: &str) -> Option<A> { FromStr::from_str(s) } |
