Add unreachable context

Better error for #123
pull/128/head
Ivan Tham 2021-06-05 20:18:27 +08:00 committed by GitHub
parent 407b37c327
commit 6254720f53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -199,7 +199,7 @@ fn categorize(ch: char) -> Category {
} else if ch.is_ascii_punctuation() { } else if ch.is_ascii_punctuation() {
Category::Punctuation Category::Punctuation
} else { } else {
unreachable!() unreachable!("unknown '{}' character category", ch)
} }
} }