Rollup merge of #141110 - xizheyin:issue-141107, r=workingjubilee

[std] fix the presentation of `split_off_mut` and `split_off` documentation

Fixes #141107

r? libs
This commit is contained in:
Stuart Cook
2025-05-19 13:24:55 +10:00
committed by GitHub
+2 -2
View File
@@ -4383,7 +4383,7 @@ pub fn partition_point<P>(&self, mut pred: P) -> usize
/// 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 @@ pub fn split_off<'a, R: OneSidedRange<usize>>(
/// 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'];