1 error: `into_iter` call on a collection with only one item
2 --> $DIR/iter_on_single_items.rs:6:16
4 LL | assert_eq!([123].into_iter().next(), Some(123));
5 | ^^^^^^^^^^^^^^^^^ help: try: `std::iter::once(123)`
7 = note: `-D clippy::iter-on-single-items` implied by `-D warnings`
9 error: `iter_mut` call on a collection with only one item
10 --> $DIR/iter_on_single_items.rs:7:16
12 LL | assert_eq!([123].iter_mut().next(), Some(&mut 123));
13 | ^^^^^^^^^^^^^^^^ help: try: `std::iter::once(&mut 123)`
15 error: `iter` call on a collection with only one item
16 --> $DIR/iter_on_single_items.rs:8:16
18 LL | assert_eq!([123].iter().next(), Some(&123));
19 | ^^^^^^^^^^^^ help: try: `std::iter::once(&123)`
21 error: `into_iter` call on a collection with only one item
22 --> $DIR/iter_on_single_items.rs:9:16
24 LL | assert_eq!(Some(123).into_iter().next(), Some(123));
25 | ^^^^^^^^^^^^^^^^^^^^^ help: try: `std::iter::once(123)`
27 error: `iter_mut` call on a collection with only one item
28 --> $DIR/iter_on_single_items.rs:10:16
30 LL | assert_eq!(Some(123).iter_mut().next(), Some(&mut 123));
31 | ^^^^^^^^^^^^^^^^^^^^ help: try: `std::iter::once(&mut 123)`
33 error: `iter` call on a collection with only one item
34 --> $DIR/iter_on_single_items.rs:11:16
36 LL | assert_eq!(Some(123).iter().next(), Some(&123));
37 | ^^^^^^^^^^^^^^^^ help: try: `std::iter::once(&123)`
39 error: aborting due to 6 previous errors