Skip to content

Commit e1961c4

Browse files
committed
feat(errors): Use Error trait from core crate
1 parent 62f9bcb commit e1961c4

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

src/errors.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
use core::fmt::{self, Display, Formatter};
22
#[cfg(any(feature = "byte", feature = "bit"))]
33
pub use core::num::TryFromIntError;
4-
#[cfg(feature = "std")]
5-
use std::error::Error;
4+
use core::error::Error;
65

76
#[cfg(any(feature = "byte", feature = "bit"))]
87
use rust_decimal::Decimal;
@@ -21,7 +20,6 @@ impl Display for ExceededBoundsError {
2120
}
2221

2322
#[cfg(any(feature = "byte", feature = "bit"))]
24-
#[cfg(feature = "std")]
2523
impl Error for ExceededBoundsError {}
2624

2725
#[cfg(any(feature = "byte", feature = "bit"))]
@@ -50,7 +48,6 @@ impl Display for ValueParseError {
5048
}
5149

5250
#[cfg(any(feature = "byte", feature = "bit"))]
53-
#[cfg(feature = "std")]
5451
impl Error for ValueParseError {}
5552

5653
/// The error type returned when parsing units.
@@ -111,7 +108,6 @@ impl Display for UnitParseError {
111108
}
112109
}
113110

114-
#[cfg(feature = "std")]
115111
impl Error for UnitParseError {}
116112

117113
#[cfg(any(feature = "byte", feature = "bit"))]
@@ -150,5 +146,4 @@ impl Display for ParseError {
150146
}
151147

152148
#[cfg(any(feature = "byte", feature = "bit"))]
153-
#[cfg(feature = "std")]
154149
impl Error for ParseError {}

0 commit comments

Comments
 (0)