SliceConcatExt::connect defaults to calling join

This commit is contained in:
Chris Gregory
2019-05-24 21:04:56 -05:00
parent fc45382c12
commit 3dd114e1cb
2 changed files with 3 additions and 9 deletions
+3 -5
View File
@@ -582,7 +582,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",
@@ -616,10 +618,6 @@ fn join(&self, sep: &T) -> Vec<T> {
}
result
}
fn connect(&self, sep: &T) -> Vec<T> {
self.join(sep)
}
}
////////////////////////////////////////////////////////////////////////////////
-4
View File
@@ -86,10 +86,6 @@ fn join(&self, sep: &str) -> String {
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 {