Another one for the list:
let a = "abc";
let b = "def";
let c = "ghi";
let x = [a, b, c].concat();
println!("{:?}", x);
Which automatically does the capacity calculation that @kornel mentioned.
Another one for the list:
let a = "abc";
let b = "def";
let c = "ghi";
let x = [a, b, c].concat();
println!("{:?}", x);
Which automatically does the capacity calculation that @kornel mentioned.