about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAnirudh Balaji <anirudhb@users.noreply.github.com>2018-07-10 10:56:58 -0700
committerGitHub <noreply@github.com>2018-07-10 10:56:58 -0700
commit4b51484fed75750a84d8422d26a9a7e6c06294e0 (patch)
tree8f1d57309ea8046f196c5d23abaf4247fd81c280
parentc90a821d43dee1ff0d04d84a9adb4ec11dbe6c47 (diff)
downloadrust-4b51484fed75750a84d8422d26a9a7e6c06294e0.tar.gz
rust-4b51484fed75750a84d8422d26a9a7e6c06294e0.zip
Change wording for {copy, clone}_from_slice
-rw-r--r--src/libcore/slice/mod.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libcore/slice/mod.rs b/src/libcore/slice/mod.rs
index c41776a1460..a0270d747a9 100644
--- a/src/libcore/slice/mod.rs
+++ b/src/libcore/slice/mod.rs
@@ -1541,9 +1541,9 @@ 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
-    /// // 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.
+    /// // Because the slices have to be the same length,
+    /// // we slice the source slice from four elements
+    /// // to two. It will panic if we don't do this.
     /// dst.clone_from_slice(&src[2..]);
     ///
     /// assert_eq!(src, [1, 2, 3, 4]);
@@ -1610,9 +1610,9 @@ 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
-    /// // 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.
+    /// // Because the slices have to be the same length,
+    /// // we slice the source slice from four elements
+    /// // to two. It will panic if we don't do this.
     /// dst.copy_from_slice(&src[2..]);
     ///
     /// assert_eq!(src, [1, 2, 3, 4]);