@@ -56,7 +56,7 @@ fn count_letters(s: &str) -> Result<HashMap<char, usize>, IsogramError> {
5656/// # Return
5757///
5858/// - `Ok(true)` if all characters appear only once, or `Ok(false)` if any character appears more than once.
59- /// - `Err(IsogramError::NonAlphabeticCharacter) if the input contains any non-alphabetic characters.
59+ /// - `Err(IsogramError::NonAlphabeticCharacter)` if the input contains any non-alphabetic characters.
6060pub fn is_isogram ( s : & str ) -> Result < bool , IsogramError > {
6161 let letter_counts = count_letters ( s) ?;
6262 Ok ( letter_counts. values ( ) . all ( |& count| count == 1 ) )
@@ -89,7 +89,7 @@ mod tests {
8989 isogram_sentences: ( "The big dwarf only jumps" , Ok ( true ) ) ,
9090 isogram_french: ( "Lampez un fort whisky" , Ok ( true ) ) ,
9191 isogram_portuguese: ( "Velho traduz sim" , Ok ( true ) ) ,
92- isogram_spanis : ( "Centrifugadlos" , Ok ( true ) ) ,
92+ isogram_spanish : ( "Centrifugadlos" , Ok ( true ) ) ,
9393 invalid_isogram_with_repeated_char: ( "hello" , Ok ( false ) ) ,
9494 invalid_isogram_with_numbers: ( "abc123" , Err ( IsogramError :: NonAlphabeticCharacter ) ) ,
9595 invalid_isogram_with_special_char: ( "abc!" , Err ( IsogramError :: NonAlphabeticCharacter ) ) ,
0 commit comments