File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ use crate::error::{Error, ErrorKind};
44
55/// The kinds of errors that can occur when working with the [`DateTime`](crate::DateTime) type.
66#[ derive( Clone , Debug , ThisError ) ]
7+ #[ non_exhaustive]
78pub enum DateTimeErrorKind {
89 /// The `DateTime` could not be formatted.
910 #[ error( "{message}" ) ]
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ use crate::error::{Error, ErrorKind};
66/// The kinds of errors that can occur when working with the [`ObjectId`](crate::oid::ObjectId)
77/// type.
88#[ derive( Clone , Debug , ThisError ) ]
9+ #[ non_exhaustive]
910pub enum ObjectIdErrorKind {
1011 /// An invalid character was found in the provided hex string. Valid characters are: `0...9`,
1112 /// `a...f`, or `A...F`.
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ use crate::{
1111#[ non_exhaustive]
1212pub enum UuidErrorKind {
1313 /// An invalid string was used to construct a UUID.
14- #[ error( "Invalid UUID string: {message}" ) ]
14+ #[ error( "{message}" ) ]
1515 #[ non_exhaustive]
1616 InvalidString {
1717 /// A message describing the error.
@@ -21,8 +21,8 @@ pub enum UuidErrorKind {
2121 /// The requested [`UuidRepresentation`] does not match the binary subtype of a [`Binary`]
2222 /// value.
2323 #[ error(
24- "UUID representation mismatch: expected binary subtype {expected_binary_subtype:?} for \
25- representation {requested_representation:?}, got {actual_binary_subtype:?}"
24+ "expected binary subtype {expected_binary_subtype:?} for representation \
25+ {requested_representation:?}, got {actual_binary_subtype:?}"
2626 ) ]
2727 #[ non_exhaustive]
2828 RepresentationMismatch {
@@ -37,7 +37,7 @@ pub enum UuidErrorKind {
3737 } ,
3838
3939 /// An invalid length of bytes was used to construct a UUID value.
40- #[ error( "Invalid UUID length: expected 16 bytes, got {length}" ) ]
40+ #[ error( "expected length of 16 bytes, got {length}" ) ]
4141 #[ non_exhaustive]
4242 InvalidLength {
4343 /// The actual length of the data.
You can’t perform that action at this time.
0 commit comments