Skip to content

Commit 433c010

Browse files
authored
base64ct: use core::error::Error (#1681)
1 parent f0c4daf commit 433c010

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

base64ct/src/errors.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ impl fmt::Display for InvalidLengthError {
1515
}
1616
}
1717

18-
#[cfg(feature = "std")]
19-
impl std::error::Error for InvalidLengthError {}
18+
impl core::error::Error for InvalidLengthError {}
2019

2120
/// Invalid encoding of provided Base64 string.
2221
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
@@ -28,8 +27,7 @@ impl fmt::Display for InvalidEncodingError {
2827
}
2928
}
3029

31-
#[cfg(feature = "std")]
32-
impl std::error::Error for InvalidEncodingError {}
30+
impl core::error::Error for InvalidEncodingError {}
3331

3432
/// Generic error, union of [`InvalidLengthError`] and [`InvalidEncodingError`].
3533
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
@@ -80,5 +78,4 @@ impl From<Error> for std::io::Error {
8078
}
8179
}
8280

83-
#[cfg(feature = "std")]
84-
impl std::error::Error for Error {}
81+
impl core::error::Error for Error {}

0 commit comments

Comments
 (0)