mirror of
https://github.com/achanda/ipnetwork.git
synced 2025-06-16 08:48:51 +00:00
cargo fmt
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
use std::net::Ipv4Addr;
|
||||
use std::fmt;
|
||||
use std::error::Error;
|
||||
use std::fmt;
|
||||
use std::net::Ipv4Addr;
|
||||
|
||||
/// Represents a bunch of errors that can occur while working with a `IpNetwork`
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
|
@ -243,10 +243,10 @@ pub fn ipv4_mask_to_prefix(mask: Ipv4Addr) -> Result<u8, IpNetworkError> {
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use std::mem;
|
||||
use std::collections::HashMap;
|
||||
use std::net::Ipv4Addr;
|
||||
use super::*;
|
||||
use std::collections::HashMap;
|
||||
use std::mem;
|
||||
use std::net::Ipv4Addr;
|
||||
|
||||
#[test]
|
||||
fn create_v4() {
|
||||
|
@ -253,8 +253,8 @@ pub fn ipv6_mask_to_prefix(mask: Ipv6Addr) -> Result<u8, IpNetworkError> {
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use std::net::Ipv6Addr;
|
||||
use super::*;
|
||||
use std::net::Ipv6Addr;
|
||||
|
||||
#[test]
|
||||
fn create_v6() {
|
||||
|
@ -17,15 +17,15 @@ extern crate serde_derive;
|
||||
use std::fmt;
|
||||
use std::net::IpAddr;
|
||||
|
||||
mod common;
|
||||
mod ipv4;
|
||||
mod ipv6;
|
||||
mod common;
|
||||
|
||||
use std::str::FromStr;
|
||||
|
||||
pub use ipv4::{Ipv4Network, ipv4_mask_to_prefix};
|
||||
pub use ipv6::{Ipv6Network, ipv6_mask_to_prefix};
|
||||
pub use common::IpNetworkError;
|
||||
pub use ipv4::{ipv4_mask_to_prefix, Ipv4Network};
|
||||
pub use ipv6::{ipv6_mask_to_prefix, Ipv6Network};
|
||||
|
||||
/// Represents a generic network range. This type can have two variants:
|
||||
/// the v4 and the v6 case.
|
||||
|
Reference in New Issue
Block a user