about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/slice.rs8
-rw-r--r--src/liballoc/str.rs4
2 files changed, 3 insertions, 9 deletions
diff --git a/src/liballoc/slice.rs b/src/liballoc/slice.rs
index aeb7f90d3e6..f7b0a5e703c 100644
--- a/src/liballoc/slice.rs
+++ b/src/liballoc/slice.rs
@@ -581,7 +581,9 @@ pub trait SliceConcatExt<T: ?Sized> {
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
     #[rustc_deprecated(since = "1.3.0", reason = "renamed to join")]
-    fn connect(&self, sep: &T) -> Self::Output;
+    fn connect(&self, sep: &T) -> Self::Output {
+        self.join(sep)
+    }
 }
 
 #[unstable(feature = "slice_concat_ext",
@@ -615,10 +617,6 @@ impl<T: Clone, V: Borrow<[T]>> SliceConcatExt<T> for [V] {
         }
         result
     }
-
-    fn connect(&self, sep: &T) -> Vec<T> {
-        self.join(sep)
-    }
 }
 
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/src/liballoc/str.rs b/src/liballoc/str.rs
index 0c7d2b837a3..40104554fe5 100644
--- a/src/liballoc/str.rs
+++ b/src/liballoc/str.rs
@@ -86,10 +86,6 @@ impl<S: Borrow<str>> SliceConcatExt<str> for [S] {
             String::from_utf8_unchecked( join_generic_copy(self, sep.as_bytes()) )
         }
     }
-
-    fn connect(&self, sep: &str) -> String {
-        self.join(sep)
-    }
 }
 
 macro_rules! spezialize_for_lengths {