We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 82b6b10 commit fb98975Copy full SHA for fb98975
library/core/src/iter/traits/iterator.rs
@@ -4073,7 +4073,7 @@ pub trait Iterator {
4073
/// Example:
4074
/// ```
4075
/// #![feature(iter_contains)]
4076
- /// assert!([1, 2, 3].iter().contains(&1));
+ /// assert!([1, 2, 3].iter().map(|&x| x * 3).contains(&6));
4077
/// assert!(![1, 2, 3].iter().contains(&4));
4078
/// // You can check if a String is in a string slice iterator.
4079
/// assert!(["a", "b", "c"].iter().contains(&"b".to_owned()));
0 commit comments