mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-06-25 14:22:54 +02:00
Improve the "bad literal" error message.
Incidentally, this was done by using the Debug impl for `char` instead of the Display impl. Cute. Fixes #5.
This commit is contained in:
@ -62,7 +62,7 @@ impl fmt::Display for Error {
|
||||
match *self {
|
||||
Error::Regex(ref err) => err.fmt(f),
|
||||
Error::LiteralNotAllowed(chr) => {
|
||||
write!(f, "Literal '{}' not allowed.", chr)
|
||||
write!(f, "Literal {:?} not allowed.", chr)
|
||||
}
|
||||
Error::__Nonexhaustive => unreachable!(),
|
||||
}
|
||||
|
Reference in New Issue
Block a user