Skip to content

Commit

Permalink
fix features
Browse files Browse the repository at this point in the history
  • Loading branch information
magiclen committed Nov 2, 2022
1 parent 8a57890 commit b3bc632
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "byte-unit"
version = "4.0.16"
version = "4.0.17"
authors = ["Magic Len <len@magiclen.org>"]
edition = "2021"
repository = "https://github.com/magiclen/byte-unit"
Expand All @@ -15,11 +15,11 @@ include = ["src/**/*", "Cargo.toml", "README.md", "LICENSE"]
[dependencies]
utf8-width = "0.1"

serde = { version = "1", default-features = false, optional = true }
serde_dep = { package = "serde", version = "1", default-features = false, features = ["alloc"], optional = true }

[features]
default = ["std", "u128"]
serde = ["alloc"]
std = ["serde/std", "alloc"]
serde = ["alloc", "serde_dep"]
std = ["serde_dep/std", "alloc"]
alloc = []
u128 = []
2 changes: 1 addition & 1 deletion src/adjusted_byte.rs
Expand Up @@ -2,7 +2,7 @@ use core::cmp::Ordering;

use core::fmt::{self, Display, Formatter};

#[cfg(any(feature = "serde", feature = "alloc"))]
#[cfg(feature = "alloc")]
use alloc::string::String;

use crate::{get_bytes, Byte, ByteUnit};
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Expand Up @@ -156,7 +156,7 @@ extern crate alloc;

#[cfg(feature = "serde")]
#[macro_use]
extern crate serde;
extern crate serde_dep as serde;

#[cfg(feature = "u128")]
#[macro_use]
Expand Down

0 comments on commit b3bc632

Please sign in to comment.