From 57284e68803c820ea8d453ed9711e065d2fb3b49 Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Sun, 26 Apr 2015 23:18:19 -0400 Subject: [PATCH] Make From::from example more idiomatic / simpler --- src/libcore/convert.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libcore/convert.rs b/src/libcore/convert.rs index d9cda58d9ebed..d3de77a9241e3 100644 --- a/src/libcore/convert.rs +++ b/src/libcore/convert.rs @@ -83,10 +83,8 @@ pub trait Into: 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); /// ```