cargo fmt
This commit is contained in:
parent
ed11799bf5
commit
c4eece7ffd
8 changed files with 113 additions and 53 deletions
11
src/utils.rs
11
src/utils.rs
|
@ -38,10 +38,13 @@ pub fn get_final_mora(word: &str) -> String {
|
|||
let mut iter = word.chars().rev();
|
||||
let final_char = iter.next().unwrap();
|
||||
match final_char {
|
||||
'ゃ' | 'ゅ' | 'ょ' => format!("{}{final_char}", match iter.next() {
|
||||
Some(c) => c.to_string(),
|
||||
None => String::from(""),
|
||||
}),
|
||||
'ゃ' | 'ゅ' | 'ょ' => format!(
|
||||
"{}{final_char}",
|
||||
match iter.next() {
|
||||
Some(c) => c.to_string(),
|
||||
None => String::from(""),
|
||||
}
|
||||
),
|
||||
_ => final_char.to_string(),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue