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};
4
4
5
5
/// The kinds of errors that can occur when working with the [`DateTime`](crate::DateTime) type.
6
6
#[ derive( Clone , Debug , ThisError ) ]
7
+ #[ non_exhaustive]
7
8
pub enum DateTimeErrorKind {
8
9
/// The `DateTime` could not be formatted.
9
10
#[ error( "{message}" ) ]
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ use crate::error::{Error, ErrorKind};
6
6
/// The kinds of errors that can occur when working with the [`ObjectId`](crate::oid::ObjectId)
7
7
/// type.
8
8
#[ derive( Clone , Debug , ThisError ) ]
9
+ #[ non_exhaustive]
9
10
pub enum ObjectIdErrorKind {
10
11
/// An invalid character was found in the provided hex string. Valid characters are: `0...9`,
11
12
/// `a...f`, or `A...F`.
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ use crate::{
11
11
#[ non_exhaustive]
12
12
pub enum UuidErrorKind {
13
13
/// An invalid string was used to construct a UUID.
14
- #[ error( "Invalid UUID string: {message}" ) ]
14
+ #[ error( "{message}" ) ]
15
15
#[ non_exhaustive]
16
16
InvalidString {
17
17
/// A message describing the error.
@@ -21,8 +21,8 @@ pub enum UuidErrorKind {
21
21
/// The requested [`UuidRepresentation`] does not match the binary subtype of a [`Binary`]
22
22
/// value.
23
23
#[ 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:?}"
26
26
) ]
27
27
#[ non_exhaustive]
28
28
RepresentationMismatch {
@@ -37,7 +37,7 @@ pub enum UuidErrorKind {
37
37
} ,
38
38
39
39
/// 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}" ) ]
41
41
#[ non_exhaustive]
42
42
InvalidLength {
43
43
/// The actual length of the data.
You can’t perform that action at this time.
0 commit comments