2022-03-26 18:01:29 -05:00
|
|
|
// run-rustfix
|
|
|
|
|
|
|
|
fn get_vowel_count(string: &str) -> usize {
|
|
|
|
string
|
|
|
|
.chars()
|
|
|
|
.filter(|c| "aeiou".contains(c))
|
2023-10-04 20:50:00 -05:00
|
|
|
//~^ ERROR expected a `Fn(char)` closure, found `char`
|
2022-03-26 18:01:29 -05:00
|
|
|
.count()
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let _ = get_vowel_count("asdf");
|
|
|
|
}
|