Skip to content

Commit b362542

Browse files
authored
Merge pull request #656 from basbossink-ds/fix/655-deserialize-error-msg
Fix error message.
2 parents 60ca9af + 40d8711 commit b362542

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ impl fmt::Display for Error {
134134
ErrorKind::Char {
135135
character, index, ..
136136
} => {
137-
write!(f, "invalid character: expected an optional prefix of `urn:uuid:` followed by [0-9a-zA-Z], found `{}` at {}", character, index)
137+
write!(f, "invalid character: expected an optional prefix of `urn:uuid:` followed by [0-9a-fA-F-], found `{}` at {}", character, index)
138138
}
139139
ErrorKind::SimpleLength { len } => {
140140
write!(

src/external/serde_support.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ mod serde_tests {
302302
fn test_de_failure() {
303303
serde_test::assert_de_tokens_error::<Readable<Uuid>>(
304304
&[Token::Str("hello_world")],
305-
"UUID parsing failed: invalid character: expected an optional prefix of `urn:uuid:` followed by [0-9a-zA-Z], found `h` at 1",
305+
"UUID parsing failed: invalid character: expected an optional prefix of `urn:uuid:` followed by [0-9a-fA-F-], found `h` at 1",
306306
);
307307

308308
serde_test::assert_de_tokens_error::<Compact<Uuid>>(

src/macros.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ define_uuid_macro! {
7272
/// Provides the following compilation error:
7373
///
7474
/// ```txt
75-
/// error: invalid character: expected an optional prefix of `urn:uuid:` followed by 0123456789abcdefABCDEF-, found Z at 9
75+
/// error: invalid character: expected an optional prefix of `urn:uuid:` followed by [0-9a-fA-F-], found Z at 9
7676
/// |
7777
/// | let id = uuid!("F9168C5E-ZEB2-4FAA-B6BF-329BF39FA1E4");
7878
/// | ^

0 commit comments

Comments
 (0)