blob: dab09be7ebd092cdc0d98da8f1dfb6357fe83004 [file] [log] [blame]
#![warn(clippy::unnecessary_join)]
#![allow(clippy::uninlined_format_args, clippy::useless_vec)]
fn main() {
// should be linted
let vector = vec!["hello", "world"];
let output = vector
.iter()
.map(|item| item.to_uppercase())
.collect::<String>();
println!("{}", output);
// should be linted
let vector = vec!["hello", "world"];
let output = vector
.iter()
.map(|item| item.to_uppercase())
.collect::<String>();
println!("{}", output);
// should not be linted
let vector = vec!["hello", "world"];
let output = vector
.iter()
.map(|item| item.to_uppercase())
.collect::<Vec<String>>()
.join("\n");
println!("{}", output);
// should not be linted
let vector = vec!["hello", "world"];
let output = vector.iter().map(|item| item.to_uppercase()).collect::<String>();
println!("{}", output);
}