mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-17 07:48:55 +00:00
14 lines
270 B
Rust
14 lines
270 B
Rust
//@ run-rustfix
|
|
|
|
fn get_vowel_count(string: &str) -> usize {
|
|
string
|
|
.chars()
|
|
.filter(|c| "aeiou".contains(c))
|
|
//~^ ERROR the trait bound `&char: Pattern` is not satisfied
|
|
.count()
|
|
}
|
|
|
|
fn main() {
|
|
let _ = get_vowel_count("asdf");
|
|
}
|