Skip to content

Commit cd0ebc4

Browse files
committed
Rename partition_mut to partition_in_place
1 parent cdeec0a commit cd0ebc4

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/libcore/iter/traits/iterator.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1472,10 +1472,10 @@ pub trait Iterator {
14721472
/// `partition()` returns a pair, all of the elements for which it returned
14731473
/// `true`, and all of the elements for which it returned `false`.
14741474
///
1475-
/// See also [`is_partitioned()`] and [`partition_mut()`].
1475+
/// See also [`is_partitioned()`] and [`partition_in_place()`].
14761476
///
14771477
/// [`is_partitioned()`]: #method.is_partitioned
1478-
/// [`partition_mut()`]: #method.partition_mut
1478+
/// [`partition_in_place()`]: #method.partition_in_place
14791479
///
14801480
/// # Examples
14811481
///
@@ -1524,18 +1524,18 @@ pub trait Iterator {
15241524
/// # Examples
15251525
///
15261526
/// ```
1527-
/// #![feature(iter_partition_mut)]
1527+
/// #![feature(iter_partition_in_place)]
15281528
///
15291529
/// let mut a = [1, 2, 3, 4, 5, 6, 7];
15301530
///
15311531
/// // Partition in-place between evens and odds
1532-
/// a.iter_mut().partition_mut(|&n| n % 2 == 0);
1532+
/// a.iter_mut().partition_in_place(|&n| n % 2 == 0);
15331533
///
15341534
/// assert!(a[..3].iter().all(|&n| n % 2 == 0)); // evens
15351535
/// assert!(a[3..].iter().all(|&n| n % 2 == 1)); // odds
15361536
/// ```
1537-
#[unstable(feature = "iter_partition_mut", reason = "new API", issue = "0")]
1538-
fn partition_mut<'a, T: 'a, P>(mut self, mut predicate: P)
1537+
#[unstable(feature = "iter_partition_in_place", reason = "new API", issue = "0")]
1538+
fn partition_in_place<'a, T: 'a, P>(mut self, mut predicate: P)
15391539
where
15401540
Self: Sized + DoubleEndedIterator<Item = &'a mut T>,
15411541
P: FnMut(&T) -> bool,
@@ -1553,10 +1553,10 @@ pub trait Iterator {
15531553
/// Checks if the elements of this iterator are partitioned according to the given predicate,
15541554
/// such that all those that return `true` precede all those that return `false`.
15551555
///
1556-
/// See also [`partition()`] and [`partition_mut()`].
1556+
/// See also [`partition()`] and [`partition_in_place()`].
15571557
///
15581558
/// [`partition()`]: #method.partition
1559-
/// [`partition_mut()`]: #method.partition_mut
1559+
/// [`partition_in_place()`]: #method.partition_in_place
15601560
///
15611561
/// # Examples
15621562
///

0 commit comments

Comments
 (0)