Skip to content

Commit 63bc8f5

Browse files
authored
Merge pull request #873 from uuid-rs/fix/error-msg
Reword invalid char error message
2 parents 02d3278 + 9bac6e6 commit 63bc8f5

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ impl fmt::Display for Error {
139139
ErrorKind::ParseChar {
140140
character, index, ..
141141
} => {
142-
write!(f, "invalid character: expected an optional prefix of `urn:uuid:` followed by [0-9a-fA-F-], found `{}` at {}", character, index)
142+
write!(f, "invalid character: found `{}` at {}", character, index)
143143
}
144144
ErrorKind::ParseSimpleLength { len } => {
145145
write!(

src/external/serde_support.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,7 @@ mod serde_tests {
934934
fn test_de_failure() {
935935
serde_test::assert_de_tokens_error::<Readable<Uuid>>(
936936
&[Token::Str("hello_world")],
937-
"UUID parsing failed: invalid character: expected an optional prefix of `urn:uuid:` followed by [0-9a-fA-F-], found `h` at 1",
937+
"UUID parsing failed: invalid character: found `h` at 1",
938938
);
939939

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

0 commit comments

Comments
 (0)