Add unreachable context

Better error for #123
This commit is contained in:
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

View File

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