diff --git a/src/error.rs b/src/error.rs index 6c3a4f43..e9aecbf8 100644 --- a/src/error.rs +++ b/src/error.rs @@ -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!( diff --git a/src/external/serde_support.rs b/src/external/serde_support.rs index 9c1a7244..5228daf1 100644 --- a/src/external/serde_support.rs +++ b/src/external/serde_support.rs @@ -302,7 +302,7 @@ mod serde_tests { fn test_de_failure() { serde_test::assert_de_tokens_error::>( &[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::>( diff --git a/src/macros.rs b/src/macros.rs index de200486..281c5335 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -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"); /// | ^