I'm doing the rustlings exercises and I tried this to make a capitalize function. But the join part does not work. It says:
"the method join exists for struct Vec<char>, but its trait bounds were not satisfied
the following trait bounds were not satisfied:
<[char] as Join<_>>::Output = _"
which I don't know what means. What would be the right way to join a char vector?
pub fn capitalize_first(input: &str) -> String {
let mut c = input.chars();
match c.next() {
None => String::new(),
Some(first) => {
let upper = first.to_ascii_uppercase();
let mut v = c.collect::<Vec<char>>();
v[0] = upper;
v.join("")
},
}
}