@@ -1541,9 +1541,9 @@ impl<T> [T] {
1541
1541
/// let src = [1, 2, 3, 4];
1542
1542
/// let mut dst = [0, 0];
1543
1543
///
1544
- /// // Note: the slices must be the same length, so you can slice the source
1545
- /// // or the destination to be the same size. Here we slice the source, four elements,
1546
- /// // to two, the same size as the destination slice . It * will* panic if we don't do this.
1544
+ /// // Because the slices have to be the same length,
1545
+ /// // we slice the source slice from four elements
1546
+ /// // to two. It will panic if we don't do this.
1547
1547
/// dst.clone_from_slice(&src[2..]);
1548
1548
///
1549
1549
/// assert_eq!(src, [1, 2, 3, 4]);
@@ -1610,9 +1610,9 @@ impl<T> [T] {
1610
1610
/// let src = [1, 2, 3, 4];
1611
1611
/// let mut dst = [0, 0];
1612
1612
///
1613
- /// // Note: the slices must be the same length, so you can slice the source
1614
- /// // or the destination to be the same size. Here we slice the source, four elements,
1615
- /// // to two, the same size as the destination slice . It * will* panic if we don't do this.
1613
+ /// // Because the slices have to be the same length,
1614
+ /// // we slice the source slice from four elements
1615
+ /// // to two. It will panic if we don't do this.
1616
1616
/// dst.copy_from_slice(&src[2..]);
1617
1617
///
1618
1618
/// assert_eq!(src, [1, 2, 3, 4]);
0 commit comments