about summary refs log tree commit diff
path: root/src/libstd/from_str.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/from_str.rs')
-rw-r--r--src/libstd/from_str.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libstd/from_str.rs b/src/libstd/from_str.rs
index 1ca72bca20b..21b1e0560a5 100644
--- a/src/libstd/from_str.rs
+++ b/src/libstd/from_str.rs
@@ -14,7 +14,6 @@
 
 use option::{Option, Some, None};
 use string::String;
-use str::StrAllocating;
 
 /// A trait to abstract the idea of creating a new instance of a type from a
 /// string.
@@ -55,7 +54,7 @@ impl FromStr for bool {
 impl FromStr for String {
     #[inline]
     fn from_str(s: &str) -> Option<String> {
-        Some(s.to_string())
+        Some(String::from_str(s))
     }
 }