about summary refs log tree commit diff
path: root/src/libstd/str.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/str.rs')
-rw-r--r--src/libstd/str.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libstd/str.rs b/src/libstd/str.rs
index d68ed099a4a..b57c329983e 100644
--- a/src/libstd/str.rs
+++ b/src/libstd/str.rs
@@ -910,10 +910,9 @@ impl OwnedStr for String {
     }
 
     #[inline]
-    fn append(self, rhs: &str) -> String {
-        let mut new_str = String::from_owned_str(self);
-        new_str.push_str(rhs);
-        new_str
+    fn append(mut self, rhs: &str) -> String {
+        self.push_str(rhs);
+        self
     }
 }