From c7fe4ffe3d8315dfe98bee6d040b5a0381daab91 Mon Sep 17 00:00:00 2001 From: Richo Healey Date: Sat, 24 May 2014 21:59:56 -0700 Subject: std: Remove String::from_owned_str as it's redundant [breaking-change] --- src/libstd/str.rs | 7 +++---- src/libstd/string.rs | 3 ++- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/libstd') 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 } } diff --git a/src/libstd/string.rs b/src/libstd/string.rs index f4d1e2a1858..8897750df65 100644 --- a/src/libstd/string.rs +++ b/src/libstd/string.rs @@ -68,7 +68,8 @@ impl String { } } - /// Creates a new string buffer from the given owned string, taking care not to copy it. + #[allow(missing_doc)] + #[deprecated = "obsoleted by the removal of ~str"] #[inline] pub fn from_owned_str(string: String) -> String { string -- cgit 1.4.1-3-g733a5