Rollup merge of #92509 - Gentoli:partition-ex, r=camelid
doc: `Iterator::partition` use partial type hints Switch to partial type hints to indicate only the collection type is needed.
This commit is contained in:
commit
d85e4b1e35
@ -1877,9 +1877,9 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
/// let a = [1, 2, 3];
|
/// let a = [1, 2, 3];
|
||||||
///
|
///
|
||||||
/// let (even, odd): (Vec<i32>, Vec<i32>) = a
|
/// let (even, odd): (Vec<_>, Vec<_>) = a
|
||||||
/// .iter()
|
/// .into_iter()
|
||||||
/// .partition(|&n| n % 2 == 0);
|
/// .partition(|n| n % 2 == 0);
|
||||||
///
|
///
|
||||||
/// assert_eq!(even, vec![2]);
|
/// assert_eq!(even, vec![2]);
|
||||||
/// assert_eq!(odd, vec![1, 3]);
|
/// assert_eq!(odd, vec![1, 3]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user