Skip to content

Commit 31fe038

Browse files
committed
Fix support for no_std
* Serde can be used with "alloc" feature only. * Error can be implemented now with Error Signed-off-by: Jon Doron <[email protected]>
1 parent d85c937 commit 31fe038

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ serde = ["dep:serde"]
2727

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

3232
[dev-dependencies]
3333
serde_test = "1.0.27"

src/errors.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ impl fmt::Display for NetworkParseError {
8181
}
8282
}
8383

84-
#[cfg(feature = "std")]
8584
impl Error for NetworkParseError {
8685
fn description(&self) -> &str {
8786
"network parse error"
@@ -137,7 +136,6 @@ impl fmt::Display for InetTupleError {
137136
}
138137
}
139138

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

0 commit comments

Comments
 (0)