Skip to content

Commit

Permalink
Merge pull request #656 from basbossink-ds/fix/655-deserialize-error-msg
Browse files Browse the repository at this point in the history
Fix error message.
  • Loading branch information
KodrAus authored Jan 31, 2023
2 parents 60ca9af + 40d8711 commit b362542
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ impl fmt::Display for Error {
ErrorKind::Char {
character, index, ..
} => {
write!(f, "invalid character: expected an optional prefix of `urn:uuid:` followed by [0-9a-zA-Z], found `{}` at {}", character, index)
write!(f, "invalid character: expected an optional prefix of `urn:uuid:` followed by [0-9a-fA-F-], found `{}` at {}", character, index)
}
ErrorKind::SimpleLength { len } => {
write!(
Expand Down
2 changes: 1 addition & 1 deletion src/external/serde_support.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ mod serde_tests {
fn test_de_failure() {
serde_test::assert_de_tokens_error::<Readable<Uuid>>(
&[Token::Str("hello_world")],
"UUID parsing failed: invalid character: expected an optional prefix of `urn:uuid:` followed by [0-9a-zA-Z], found `h` at 1",
"UUID parsing failed: invalid character: expected an optional prefix of `urn:uuid:` followed by [0-9a-fA-F-], found `h` at 1",
);

serde_test::assert_de_tokens_error::<Compact<Uuid>>(
Expand Down
2 changes: 1 addition & 1 deletion src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ define_uuid_macro! {
/// Provides the following compilation error:
///
/// ```txt
/// error: invalid character: expected an optional prefix of `urn:uuid:` followed by 0123456789abcdefABCDEF-, found Z at 9
/// error: invalid character: expected an optional prefix of `urn:uuid:` followed by [0-9a-fA-F-], found Z at 9
/// |
/// | let id = uuid!("F9168C5E-ZEB2-4FAA-B6BF-329BF39FA1E4");
/// | ^
Expand Down

0 comments on commit b362542

Please sign in to comment.