Skip to content

Commit

Permalink
Improve InvalidChar Display impl
Browse files Browse the repository at this point in the history
Remove the 'code=' and just write the character in single quotes.
  • Loading branch information
tcharding committed Nov 2, 2023
1 parent 61b6300 commit a321ee5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/primitives/decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ impl fmt::Display for CharError {
match *self {
MissingSeparator => write!(f, "missing human-readable separator, \"{}\"", SEP),
NothingAfterSeparator => write!(f, "invalid data - no characters after the separator"),
InvalidChar(n) => write!(f, "invalid character (code={})", n),
InvalidChar(n) => write!(f, "invalid character '{}'", n),
MixedCase => write!(f, "mixed-case strings not allowed"),
}
}
Expand Down

0 comments on commit a321ee5

Please sign in to comment.