// run-rustfix #![warn(clippy::unnecessary_join)] fn main() { // should be linted let vector = vec!["hello", "world"]; let output = vector .iter() .map(|item| item.to_uppercase()) .collect::>() .join(""); println!("{}", output); // should be linted let vector = vec!["hello", "world"]; let output = vector .iter() .map(|item| item.to_uppercase()) .collect::>() .join(""); println!("{}", output); // should not be linted let vector = vec!["hello", "world"]; let output = vector .iter() .map(|item| item.to_uppercase()) .collect::>() .join("\n"); println!("{}", output); // should not be linted let vector = vec!["hello", "world"]; let output = vector.iter().map(|item| item.to_uppercase()).collect::(); println!("{}", output); }