Rust

Rust

Made by DeepSource

Using .join(..) with empty string RS-W1203

Anti-pattern
Minor

Using slice::join with an empty string literal is equivalent to slice::concat. The latter is more readable and generally more performant. Consider using .concat() over .join("").

Bad practice

println!("{}", ["hell", "ope"].join(""));
// "hellope"

Recommended

println!("{}", ["hell", "ope"].concat());
// "hellope"