Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/bit/adjusted/rocket_traits.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::str::FromStr;
use core::str::FromStr;

use rocket::{
form::{self, FromFormField, ValueField},
Expand Down
2 changes: 1 addition & 1 deletion src/bit/rocket_traits.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::str::FromStr;
use core::str::FromStr;

use rocket::{
form::{self, FromFormField, ValueField},
Expand Down
2 changes: 1 addition & 1 deletion src/byte/adjusted/rocket_traits.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::str::FromStr;
use core::str::FromStr;

use rocket::{
form::{self, FromFormField, ValueField},
Expand Down
2 changes: 1 addition & 1 deletion src/byte/rocket_traits.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::str::FromStr;
use core::str::FromStr;

use rocket::{
form::{self, FromFormField, ValueField},
Expand Down
11 changes: 4 additions & 7 deletions src/errors.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
use core::fmt::{self, Display, Formatter};
#[cfg(any(feature = "byte", feature = "bit"))]
pub use core::num::TryFromIntError;
#[cfg(feature = "std")]
use std::error::Error;
use core::{
error::Error,
fmt::{self, Display, Formatter},
};

#[cfg(any(feature = "byte", feature = "bit"))]
use rust_decimal::Decimal;
Expand All @@ -21,7 +22,6 @@ impl Display for ExceededBoundsError {
}

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

#[cfg(any(feature = "byte", feature = "bit"))]
Expand Down Expand Up @@ -50,7 +50,6 @@ impl Display for ValueParseError {
}

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

/// The error type returned when parsing units.
Expand Down Expand Up @@ -111,7 +110,6 @@ impl Display for UnitParseError {
}
}

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

#[cfg(any(feature = "byte", feature = "bit"))]
Expand Down Expand Up @@ -150,5 +148,4 @@ impl Display for ParseError {
}

#[cfg(any(feature = "byte", feature = "bit"))]
#[cfg(feature = "std")]
impl Error for ParseError {}
2 changes: 1 addition & 1 deletion src/unit/rocket_traits.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::str::FromStr;
use core::str::FromStr;

use rocket::{
form::{self, FromFormField, ValueField},
Expand Down