doc: make concat() and connect() examples brief

This commit is contained in:
Tshepang Lekhonkhobe 2015-05-03 05:27:36 +02:00
parent f6574c5b04
commit 78c1ae2791

View File

@ -1004,11 +1004,7 @@ pub trait SliceConcatExt<T: ?Sized, U> {
/// # Examples
///
/// ```
/// let v = vec!["hello", "world"];
///
/// let s: String = v.concat();
///
/// println!("{}", s); // prints "helloworld"
/// assert_eq!(["hello", "world"].concat(), "helloworld");
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
fn concat(&self) -> U;
@ -1018,11 +1014,7 @@ pub trait SliceConcatExt<T: ?Sized, U> {
/// # Examples
///
/// ```
/// let v = vec!["hello", "world"];
///
/// let s: String = v.connect(" ");
///
/// println!("{}", s); // prints "hello world"
/// assert_eq!(["hello", "world"].connect(" "), "hello world");
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
fn connect(&self, sep: &T) -> U;