Skip to content

Commit

Permalink
doc: make concat() and connect() examples brief
Browse files Browse the repository at this point in the history
  • Loading branch information
tshepang committed May 3, 2015
1 parent f6574c5 commit 78c1ae2
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/libcollections/slice.rs
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 78c1ae2

Please sign in to comment.