From fcb836e96c991fc95d4f548a2dca993aacdc4301 Mon Sep 17 00:00:00 2001 From: 0xprincedev Date: Wed, 5 Nov 2025 21:32:24 -0500 Subject: [PATCH] Fixed typos in src/string/isogram.rs --- src/string/isogram.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/string/isogram.rs b/src/string/isogram.rs index 30b8d66bdff..f4fc8cfd981 100644 --- a/src/string/isogram.rs +++ b/src/string/isogram.rs @@ -56,7 +56,7 @@ fn count_letters(s: &str) -> Result, IsogramError> { /// # Return /// /// - `Ok(true)` if all characters appear only once, or `Ok(false)` if any character appears more than once. -/// - `Err(IsogramError::NonAlphabeticCharacter) if the input contains any non-alphabetic characters. +/// - `Err(IsogramError::NonAlphabeticCharacter)` if the input contains any non-alphabetic characters. pub fn is_isogram(s: &str) -> Result { let letter_counts = count_letters(s)?; Ok(letter_counts.values().all(|&count| count == 1)) @@ -89,7 +89,7 @@ mod tests { isogram_sentences: ("The big dwarf only jumps", Ok(true)), isogram_french: ("Lampez un fort whisky", Ok(true)), isogram_portuguese: ("Velho traduz sim", Ok(true)), - isogram_spanis: ("Centrifugadlos", Ok(true)), + isogram_spanish: ("Centrifugadlos", Ok(true)), invalid_isogram_with_repeated_char: ("hello", Ok(false)), invalid_isogram_with_numbers: ("abc123", Err(IsogramError::NonAlphabeticCharacter)), invalid_isogram_with_special_char: ("abc!", Err(IsogramError::NonAlphabeticCharacter)),