From c90a821d43dee1ff0d04d84a9adb4ec11dbe6c47 Mon Sep 17 00:00:00 2001 From: Anirudh Balaji Date: Mon, 9 Jul 2018 13:41:46 -0700 Subject: Add "or destination" to {copy, clone}_from_slice example --- src/libcore/slice/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/libcore/slice') diff --git a/src/libcore/slice/mod.rs b/src/libcore/slice/mod.rs index 0ee4c0bdbe7..c41776a1460 100644 --- a/src/libcore/slice/mod.rs +++ b/src/libcore/slice/mod.rs @@ -1541,8 +1541,8 @@ impl [T] { /// let src = [1, 2, 3, 4]; /// let mut dst = [0, 0]; /// - /// // Note: the slices must be the same length, so you can slice the - /// // source to be the same size. Here we slice the source, four elements, + /// // Note: the slices must be the same length, so you can slice the source + /// // or the destination to be the same size. Here we slice the source, four elements, /// // to two, the same size as the destination slice. It *will* panic if we don't do this. /// dst.clone_from_slice(&src[2..]); /// @@ -1610,8 +1610,8 @@ impl [T] { /// let src = [1, 2, 3, 4]; /// let mut dst = [0, 0]; /// - /// // Note: the slices must be the same length, so you can slice the - /// // source to be the same size. Here we slice the source, four elements, + /// // Note: the slices must be the same length, so you can slice the source + /// // or the destination to be the same size. Here we slice the source, four elements, /// // to two, the same size as the destination slice. It *will* panic if we don't do this. /// dst.copy_from_slice(&src[2..]); /// -- cgit 1.4.1-3-g733a5