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