Skip to content

Commit 818ca98

Browse files
committed
Add [[T]] -> [T] examples to SliceConcatExt docs
1 parent 4ed2eda commit 818ca98

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: src/libcollections/slice.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1460,6 +1460,7 @@ pub trait SliceConcatExt<T: ?Sized> {
14601460
///
14611461
/// ```
14621462
/// assert_eq!(["hello", "world"].concat(), "helloworld");
1463+
/// assert_eq!([[1, 2], [3, 4]].concat(), [1, 2, 3, 4]);
14631464
/// ```
14641465
#[stable(feature = "rust1", since = "1.0.0")]
14651466
fn concat(&self) -> Self::Output;
@@ -1471,6 +1472,7 @@ pub trait SliceConcatExt<T: ?Sized> {
14711472
///
14721473
/// ```
14731474
/// assert_eq!(["hello", "world"].join(" "), "hello world");
1475+
/// assert_eq!([[1, 2], [3, 4]].join(&0), [1, 2, 0, 3, 4]);
14741476
/// ```
14751477
#[stable(feature = "rename_connect_to_join", since = "1.3.0")]
14761478
fn join(&self, sep: &T) -> Self::Output;

0 commit comments

Comments
 (0)