about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAnirudh Balaji <anirudhb@users.noreply.github.com>2018-07-09 13:41:46 -0700
committerGitHub <noreply@github.com>2018-07-09 13:41:46 -0700
commitc90a821d43dee1ff0d04d84a9adb4ec11dbe6c47 (patch)
treeaa4460c7c107cf709bad70ced773205ea55b927f /src
parentc95fba7b5b7cc3a923707df414f4bc8258400d52 (diff)
downloadrust-c90a821d43dee1ff0d04d84a9adb4ec11dbe6c47.tar.gz
rust-c90a821d43dee1ff0d04d84a9adb4ec11dbe6c47.zip
Add "or destination" to {copy, clone}_from_slice example
Diffstat (limited to 'src')
-rw-r--r--src/libcore/slice/mod.rs8
1 files changed, 4 insertions, 4 deletions
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> [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> [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..]);
     ///