From 3dd114e1cb24ce56d136dfd0af00780f06a2975c Mon Sep 17 00:00:00 2001 From: Chris Gregory Date: Fri, 24 May 2019 21:04:56 -0500 Subject: [PATCH] SliceConcatExt::connect defaults to calling join --- src/liballoc/slice.rs | 8 +++----- src/liballoc/str.rs | 4 ---- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/liballoc/slice.rs b/src/liballoc/slice.rs index 8768f1ff081c1..04bef58774bb7 100644 --- a/src/liballoc/slice.rs +++ b/src/liballoc/slice.rs @@ -582,7 +582,9 @@ pub trait SliceConcatExt { /// ``` #[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", @@ -616,10 +618,6 @@ impl> SliceConcatExt for [V] { } result } - - fn connect(&self, sep: &T) -> Vec { - self.join(sep) - } } //////////////////////////////////////////////////////////////////////////////// diff --git a/src/liballoc/str.rs b/src/liballoc/str.rs index f66ff894ae865..0b7374fd8e473 100644 --- a/src/liballoc/str.rs +++ b/src/liballoc/str.rs @@ -86,10 +86,6 @@ impl> SliceConcatExt 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 {