Skip to content

Commit de3a2c0

Browse files
authored
cms,tai64,tls_codex,x509-ocsp: use core::error:Error instead of std's Error (#2394)
1 parent b1e1582 commit de3a2c0

4 files changed

Lines changed: 4 additions & 8 deletions

File tree

‎cms/src/builder.rs‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,7 @@ pub enum Error {
8383
Builder(String),
8484
}
8585

86-
#[cfg(feature = "std")]
87-
impl std::error::Error for Error {}
86+
impl core::error::Error for Error {}
8887

8988
impl fmt::Display for Error {
9089
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {

‎tai64/src/lib.rs‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,7 @@ impl fmt::Display for Error {
333333
}
334334
}
335335

336-
#[cfg(feature = "std")]
337-
impl std::error::Error for Error {}
336+
impl core::error::Error for Error {}
338337

339338
#[cfg(all(test, feature = "std"))]
340339
mod tests {

‎tls_codec/src/lib.rs‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ pub enum Error {
104104
LibraryError,
105105
}
106106

107-
#[cfg(feature = "std")]
108-
impl std::error::Error for Error {}
107+
impl core::error::Error for Error {}
109108

110109
impl Display for Error {
111110
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {

‎x509-ocsp/src/builder.rs‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ pub enum Error {
2121
Signature(signature::Error),
2222
}
2323

24-
#[cfg(feature = "std")]
25-
impl std::error::Error for Error {}
24+
impl core::error::Error for Error {}
2625

2726
impl fmt::Display for Error {
2827
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {

0 commit comments

Comments
 (0)