From cff60d0cd9204486af4d71fcfd788e6e442d4869 Mon Sep 17 00:00:00 2001 From: Abhishek Chanda Date: Fri, 12 Feb 2016 10:48:10 -0800 Subject: [PATCH] Revert "Revert "Use the ip crate"" This reverts commit d5422c0fd772bc5914a613f41a389072ccd372d1. --- Cargo.toml | 3 ++- src/lib.rs | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e299018..25363f7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ipnetwork" -version = "0.5.0" +version = "0.4.0" authors = ["Abhishek Chanda "] description = "A library to work with IP CIDRs in Rust, heavily WIP" license = "Apache-2.0" @@ -8,6 +8,7 @@ repository = "https://github.com/achanda/ipnetwork" [dependencies] clippy = {version = "0.0.37", optional = true} +ip = "1.0.0" [features] default = [] diff --git a/src/lib.rs b/src/lib.rs index 9ba6098..b685a35 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,8 +4,12 @@ #![crate_type = "lib"] #[allow(dead_code)] +extern crate ip; + use std::fmt; -use std::net::{IpAddr, Ipv4Addr, Ipv6Addr}; +use std::net::{Ipv4Addr, Ipv6Addr}; + +use ip::IpAddr; // A network #[derive(Debug)]