Skip to content

Commit

Permalink
doc: Iterator::partition use partial type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
Gentoli committed Mar 6, 2022
1 parent c274e49 commit 62a6594
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions library/core/src/iter/traits/iterator.rs
Expand Up @@ -1877,9 +1877,9 @@ pub trait Iterator {
/// ```
/// let a = [1, 2, 3];
///
/// let (even, odd): (Vec<i32>, Vec<i32>) = a
/// .iter()
/// .partition(|&n| n % 2 == 0);
/// let (even, odd): (Vec<_>, Vec<_>) = a
/// .into_iter()
/// .partition(|n| n % 2 == 0);
///
/// assert_eq!(even, vec![2]);
/// assert_eq!(odd, vec![1, 3]);
Expand Down

0 comments on commit 62a6594

Please sign in to comment.