diff --git a/Examples.md b/Examples.md index b0af039..b59ccf3 100644 --- a/Examples.md +++ b/Examples.md @@ -1168,6 +1168,8 @@ fn main() { println!("First element of vec1 is: {}", vec1[0]); // `into_iter()` does move `vec2` and its elements, so they cannot be used again + + let array1 = [1, 2, 3]; let array2 = [4, 5, 6]; @@ -1192,6 +1194,7 @@ fn main println! "2 in vec1: {}", &in vec1.any *$ == 2 //! since iterator ... //! ... returns references, we have to dereference the argument. //! Alternatively , we could write `$ == &2` + println! "2 in vec2: {}", in vec2.any $ == 2 println! "vec1 len: {}", vec1.len()