diff options
| author | Josh Stone <jistone@redhat.com> | 2019-07-01 15:34:53 -0700 |
|---|---|---|
| committer | Josh Stone <jistone@redhat.com> | 2019-07-09 12:39:25 -0700 |
| commit | cd0ebc43c7f0238d09bdf722409e8d77a41a37db (patch) | |
| tree | 3c7a30e25e96d052c45c2d918f9f0da3e8015486 /src/libcore | |
| parent | cdeec0a618248b9321aed338b09c94a53338626e (diff) | |
| download | rust-cd0ebc43c7f0238d09bdf722409e8d77a41a37db.tar.gz rust-cd0ebc43c7f0238d09bdf722409e8d77a41a37db.zip | |
Rename partition_mut to partition_in_place
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/iter/traits/iterator.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libcore/iter/traits/iterator.rs b/src/libcore/iter/traits/iterator.rs index e06030aee6b..45aafb4bd7f 100644 --- a/src/libcore/iter/traits/iterator.rs +++ b/src/libcore/iter/traits/iterator.rs @@ -1472,10 +1472,10 @@ pub trait Iterator { /// `partition()` returns a pair, all of the elements for which it returned /// `true`, and all of the elements for which it returned `false`. /// - /// See also [`is_partitioned()`] and [`partition_mut()`]. + /// See also [`is_partitioned()`] and [`partition_in_place()`]. /// /// [`is_partitioned()`]: #method.is_partitioned - /// [`partition_mut()`]: #method.partition_mut + /// [`partition_in_place()`]: #method.partition_in_place /// /// # Examples /// @@ -1524,18 +1524,18 @@ pub trait Iterator { /// # Examples /// /// ``` - /// #![feature(iter_partition_mut)] + /// #![feature(iter_partition_in_place)] /// /// let mut a = [1, 2, 3, 4, 5, 6, 7]; /// /// // Partition in-place between evens and odds - /// a.iter_mut().partition_mut(|&n| n % 2 == 0); + /// a.iter_mut().partition_in_place(|&n| n % 2 == 0); /// /// assert!(a[..3].iter().all(|&n| n % 2 == 0)); // evens /// assert!(a[3..].iter().all(|&n| n % 2 == 1)); // odds /// ``` - #[unstable(feature = "iter_partition_mut", reason = "new API", issue = "0")] - fn partition_mut<'a, T: 'a, P>(mut self, mut predicate: P) + #[unstable(feature = "iter_partition_in_place", reason = "new API", issue = "0")] + fn partition_in_place<'a, T: 'a, P>(mut self, mut predicate: P) where Self: Sized + DoubleEndedIterator<Item = &'a mut T>, P: FnMut(&T) -> bool, @@ -1553,10 +1553,10 @@ pub trait Iterator { /// Checks if the elements of this iterator are partitioned according to the given predicate, /// such that all those that return `true` precede all those that return `false`. /// - /// See also [`partition()`] and [`partition_mut()`]. + /// See also [`partition()`] and [`partition_in_place()`]. /// /// [`partition()`]: #method.partition - /// [`partition_mut()`]: #method.partition_mut + /// [`partition_in_place()`]: #method.partition_in_place /// /// # Examples /// |
