Skip to content

Commit 7e4fbec

Browse files
committed
pass more test cases
1 parent 4a5a4e6 commit 7e4fbec

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

rust/isogram/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pub fn check(candidate: &str) -> bool {
55
return true
66
}
77
let mut seen: HashSet<char> = HashSet ::new();
8-
for char in candidate.chars() {
8+
for char in candidate.to_lowercase().chars() {
99
if seen.contains(&char) {
1010
return false
1111
}

rust/isogram/tests/isogram.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,25 +26,21 @@ fn longest_reported_english_isogram() {
2626
}
2727

2828
#[test]
29-
#[ignore]
3029
fn word_with_duplicated_character_in_mixed_case() {
3130
assert!(!check("Alphabet"));
3231
}
3332

3433
#[test]
35-
#[ignore]
3634
fn word_with_duplicated_character_in_mixed_case_lowercase_first() {
3735
assert!(!check("alphAbet"));
3836
}
3937

4038
#[test]
41-
#[ignore]
4239
fn hypothetical_isogrammic_word_with_hyphen() {
4340
assert!(check("thumbscrew-japingly"));
4441
}
4542

4643
#[test]
47-
#[ignore]
4844
fn hypothetical_word_with_duplicated_character_following_hyphen() {
4945
assert!(!check("thumbscrew-jappingly"));
5046
}

0 commit comments

Comments
 (0)