Skip to content

Commit

Permalink
safeguard against panic
Browse files Browse the repository at this point in the history
  • Loading branch information
PSeitz committed Oct 1, 2024
1 parent fcfe10a commit 26d9da9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/to_kana.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub fn to_kana_with_opt(input: &str, options: Options) -> String {
};

// nothing found, pass through
if result.1 == 0 {
if result.1 == 0 || result.0.is_none() {
ouput.push(chars[curr_pos]);
curr_pos += 1;
} else {
Expand Down

0 comments on commit 26d9da9

Please sign in to comment.