about summary refs log tree commit diff
diff options
context:
space:
mode:
authorxizheyin <xizheyin@smail.nju.edu.cn>2025-05-17 14:51:58 +0800
committerxizheyin <xizheyin@smail.nju.edu.cn>2025-05-18 23:22:08 +0800
commit8b48bac63d7774c03644a9ed0404c1c5595add62 (patch)
tree12ab2ac2c0fbc6bb08d891c29fb1e6941e81b44e
parenta69bc17fb8026bdc0d24bb1896ff95f0eba1da4e (diff)
downloadrust-8b48bac63d7774c03644a9ed0404c1c5595add62.tar.gz
rust-8b48bac63d7774c03644a9ed0404c1c5595add62.zip
[std] fix the presentation of `split_off_mut` and `split_off` documentation
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
-rw-r--r--library/core/src/slice/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs
index 058491b53a1..c9b8231e856 100644
--- a/library/core/src/slice/mod.rs
+++ b/library/core/src/slice/mod.rs
@@ -4383,7 +4383,7 @@ impl<T> [T] {
     /// assert_eq!(first_three, &['a', 'b', 'c']);
     /// ```
     ///
-    /// Splitting off the last two elements of a slice:
+    /// Splitting off a slice starting with the third element:
     ///
     /// ```
     /// let mut slice: &[_] = &['a', 'b', 'c', 'd'];
@@ -4449,7 +4449,7 @@ impl<T> [T] {
     /// assert_eq!(first_three, &mut ['a', 'b', 'c']);
     /// ```
     ///
-    /// Taking the last two elements of a slice:
+    /// Splitting off a slice starting with the third element:
     ///
     /// ```
     /// let mut slice: &mut [_] = &mut ['a', 'b', 'c', 'd'];