2020-08-11 08:43:21 -05:00
|
|
|
#![warn(clippy::needless_collect)]
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let _ = vec![1, 2, 3].into_iter().collect::<Vec<_>>().is_empty();
|
2023-08-24 14:32:12 -05:00
|
|
|
//~^ ERROR: avoid using `collect()` when not needed
|
|
|
|
//~| NOTE: `-D clippy::needless-collect` implied by `-D warnings`
|
2020-08-11 08:43:21 -05:00
|
|
|
}
|