diff --git a/.github/workflows/ci-version.yml b/.github/workflows/ci-version.yml index d713ff4..dc1e643 100644 --- a/.github/workflows/ci-version.yml +++ b/.github/workflows/ci-version.yml @@ -64,7 +64,7 @@ jobs: - macos-latest - windows-latest toolchain: - - 1.69 + - "1.70" features: - - --features u128 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b15e712..5a68aaf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -80,7 +80,7 @@ jobs: - macos-latest - windows-latest toolchain: - - 1.69 + - "1.70" features: - - --features u128 diff --git a/Cargo.toml b/Cargo.toml index a924330..4dfe86f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "byte-unit" version = "5.1.5" authors = ["Magic Len "] edition = "2021" -rust-version = "1.69" +rust-version = "1.70" repository = "https://github.com/magiclen/byte-unit" homepage = "https://magiclen.org/byte-unit" keywords = ["byte", "unit", "kb", "mb", "gb"] diff --git a/src/bit/mod.rs b/src/bit/mod.rs index 401e40a..cb667bb 100644 --- a/src/bit/mod.rs +++ b/src/bit/mod.rs @@ -698,6 +698,7 @@ impl Bit { /// # Points to Note /// /// * If the calculated bit is too large, this function will return `None`. + #[allow(unexpected_cfgs)] #[inline] pub const fn multiply(self, rhs: usize) -> Option { #[cfg(feature = "u128")] @@ -743,6 +744,7 @@ impl Bit { /// /// * If the input right-hand side is zero, this function will return `None`. /// * The result will be rounded down. + #[allow(unexpected_cfgs)] #[inline] pub const fn divide(self, rhs: usize) -> Option { #[cfg(feature = "u128")] diff --git a/src/byte/mod.rs b/src/byte/mod.rs index 9d3f87b..3c2622e 100644 --- a/src/byte/mod.rs +++ b/src/byte/mod.rs @@ -715,6 +715,7 @@ impl Byte { /// # Points to Note /// /// * If the calculated byte is too large, this function will return `None`. + #[allow(unexpected_cfgs)] #[inline] pub const fn multiply(self, rhs: usize) -> Option { #[cfg(feature = "u128")] @@ -760,6 +761,7 @@ impl Byte { /// /// * If the input right-hand side is zero, this function will return `None`. /// * The result will be rounded down. + #[allow(unexpected_cfgs)] #[inline] pub const fn divide(self, rhs: usize) -> Option { #[cfg(feature = "u128")] diff --git a/src/errors.rs b/src/errors.rs index f753e64..a37323c 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -111,7 +111,6 @@ impl Display for UnitParseError { } } -#[cfg(any(feature = "byte", feature = "bit"))] #[cfg(feature = "std")] impl Error for UnitParseError {} diff --git a/src/lib.rs b/src/lib.rs index 51badb7..082111b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -204,9 +204,6 @@ features = ["rocket"] #![cfg_attr(not(feature = "std"), no_std)] #![cfg_attr(docsrs, feature(doc_auto_cfg))] -#[cfg(feature = "serde")] -#[macro_use] -extern crate alloc; #[cfg(feature = "rust_decimal")] pub extern crate rust_decimal;