Make From::from example more idiomatic / simpler

This commit is contained in:
Corey Farwell 2015-04-26 23:18:19 -04:00
parent 5fb0259edf
commit 57284e6880

View file

@ -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);
/// ```