Run cargo fix --edition

This commit is contained in:
Linus Färnstrand
2019-03-25 15:13:50 +01:00
parent 3479b6f272
commit c2d4b9aeae
4 changed files with 7 additions and 7 deletions

View File

@ -11,7 +11,7 @@ pub enum IpNetworkError {
impl fmt::Display for IpNetworkError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
use IpNetworkError::*;
use crate::IpNetworkError::*;
match *self {
InvalidAddr(ref s) => write!(f, "invalid address: {}", s),
InvalidPrefix => write!(f, "invalid prefix"),
@ -22,7 +22,7 @@ impl fmt::Display for IpNetworkError {
impl Error for IpNetworkError {
fn description(&self) -> &str {
use IpNetworkError::*;
use crate::IpNetworkError::*;
match *self {
InvalidAddr(_) => "address is invalid",
InvalidPrefix => "prefix is invalid",

View File

@ -4,7 +4,7 @@ use std::str::FromStr;
use serde::{de, Deserialize, Deserializer, Serialize, Serializer};
use common::{cidr_parts, parse_prefix, IpNetworkError};
use crate::common::{cidr_parts, parse_prefix, IpNetworkError};
const IPV4_BITS: u8 = 32;

View File

@ -5,7 +5,7 @@ use std::str::FromStr;
use serde::{de, Deserialize, Deserializer, Serialize, Serializer};
use common::{cidr_parts, parse_prefix, IpNetworkError};
use crate::common::{cidr_parts, parse_prefix, IpNetworkError};
const IPV6_BITS: u8 = 128;
const IPV6_SEGMENT_BITS: u8 = 16;

View File

@ -19,9 +19,9 @@ use std::str::FromStr;
use serde::{de, Deserialize, Deserializer, Serialize, Serializer};
pub use common::IpNetworkError;
pub use ipv4::{ipv4_mask_to_prefix, Ipv4Network};
pub use ipv6::{ipv6_mask_to_prefix, Ipv6Network};
pub use crate::common::IpNetworkError;
pub use crate::ipv4::{ipv4_mask_to_prefix, Ipv4Network};
pub use crate::ipv6::{ipv6_mask_to_prefix, Ipv6Network};
/// Represents a generic network range. This type can have two variants:
/// the v4 and the v6 case.