mirror of
https://github.com/achanda/ipnetwork.git
synced 2025-06-19 02:04:58 +00:00
Remove with-serde in favor of just 'serde'
https://rust-lang-nursery.github.io/api-guidelines/naming.html#feature-names-are-free-of-placeholder-words-c-feature
This commit is contained in:
@ -2,7 +2,7 @@ use std::fmt;
|
||||
use std::net::Ipv4Addr;
|
||||
use std::str::FromStr;
|
||||
|
||||
#[cfg(feature = "with-serde")]
|
||||
#[cfg(feature = "serde")]
|
||||
use serde::{de, Deserialize, Deserializer, Serialize, Serializer};
|
||||
|
||||
use common::{cidr_parts, parse_addr, parse_prefix, IpNetworkError};
|
||||
@ -16,7 +16,7 @@ pub struct Ipv4Network {
|
||||
prefix: u8,
|
||||
}
|
||||
|
||||
#[cfg(feature = "with-serde")]
|
||||
#[cfg(feature = "serde")]
|
||||
impl<'de> Deserialize<'de> for Ipv4Network {
|
||||
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
|
||||
where
|
||||
@ -27,7 +27,7 @@ impl<'de> Deserialize<'de> for Ipv4Network {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "with-serde")]
|
||||
#[cfg(feature = "serde")]
|
||||
impl Serialize for Ipv4Network {
|
||||
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
|
||||
where
|
||||
|
Reference in New Issue
Block a user