rustgym 0.2.0

rustgym solutions
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
struct Solution;

impl Solution {
    fn remove_vowels(s: String) -> String {
        s.chars()
            .filter(|&c| !matches!(c, 'a' | 'e' | 'i' | 'o' | 'u'))
            .collect()
    }
}

#[test]
fn test() {
    let s = "leetcodeisacommunityforcoders".to_string();
    let t = "ltcdscmmntyfrcdrs".to_string();
    assert_eq!(Solution::remove_vowels(s), t);
}