Skip to content

Commit a9e551a

Browse files
Fix clippy lint
1 parent ce1b91c commit a9e551a

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

uguid/src/error.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ use core::fmt::{self, Display, Formatter};
1212
///
1313
/// [`Guid::from_str`]: core::str::FromStr::from_str
1414
/// [`Guid::try_parse`]: crate::Guid::try_parse
15-
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)]
15+
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq, Hash, Ord, PartialOrd)]
1616
pub enum GuidFromStrError {
1717
/// Input has the wrong length, expected 36 bytes.
18+
#[default]
1819
Length,
1920

2021
/// Input is missing a separator (`-`) at this byte index.
@@ -24,12 +25,6 @@ pub enum GuidFromStrError {
2425
Hex(u8),
2526
}
2627

27-
impl Default for GuidFromStrError {
28-
fn default() -> Self {
29-
Self::Length
30-
}
31-
}
32-
3328
impl Display for GuidFromStrError {
3429
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
3530
match self {

0 commit comments

Comments
 (0)