Skip to content

Commit

Permalink
Fix support for no_std
Browse files Browse the repository at this point in the history
* Serde can be used with "alloc" feature only.
* Error can be implemented now with Error

Signed-off-by: Jon Doron <jond@wiz.io>
  • Loading branch information
arilou committed Jan 15, 2025
1 parent d85c937 commit 31fe038
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ serde = ["dep:serde"]

[dependencies]
bitstring = { version = "0.2.0", optional = true, features = ["net"] }
serde = { version = "1.0.27", default-features = false, features = ["alloc"], optional = true }
serde = { version = "1.0.217", default-features = false, features = ["alloc"], optional = true }

[dev-dependencies]
serde_test = "1.0.27"
Expand Down
2 changes: 0 additions & 2 deletions src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ impl fmt::Display for NetworkParseError {
}
}

#[cfg(feature = "std")]
impl Error for NetworkParseError {
fn description(&self) -> &str {
"network parse error"
Expand Down Expand Up @@ -137,7 +136,6 @@ impl fmt::Display for InetTupleError {
}
}

#[cfg(feature = "std")]
impl Error for InetTupleError {
fn description(&self) -> &str {
"inet tuple error"
Expand Down

0 comments on commit 31fe038

Please sign in to comment.