diff options
| author | Corey Farwell <coreyf@rwell.org> | 2015-04-26 23:18:19 -0400 |
|---|---|---|
| committer | Corey Farwell <coreyf@rwell.org> | 2015-04-26 23:18:19 -0400 |
| commit | 57284e68803c820ea8d453ed9711e065d2fb3b49 (patch) | |
| tree | 779a3e24d99047b1e432b3b9fc883449154c82b6 | |
| parent | 5fb0259edfbc4034cfbcf827ab91d6118b7ae848 (diff) | |
| download | rust-57284e68803c820ea8d453ed9711e065d2fb3b49.tar.gz rust-57284e68803c820ea8d453ed9711e065d2fb3b49.zip | |
Make From::from example more idiomatic / simpler
| -rw-r--r-- | src/libcore/convert.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libcore/convert.rs b/src/libcore/convert.rs index d9cda58d9eb..d3de77a9241 100644 --- a/src/libcore/convert.rs +++ b/src/libcore/convert.rs @@ -83,10 +83,8 @@ pub trait Into<T>: Sized { /// `String` implements `From<&str>`: /// /// ``` -/// let s = "hello"; /// let string = "hello".to_string(); -/// -/// let other_string: String = From::from(s); +/// let other_string = String::from("hello"); /// /// assert_eq!(string, other_string); /// ``` |
