Make time an optional dependency

This commit is contained in:
Steven Fackler 2015-03-21 15:32:49 -07:00
parent 07f380fcfb
commit 5e75155b7e
3 changed files with 7 additions and 3 deletions

View File

@ -26,7 +26,6 @@ phf_codegen = "0.6.11"
[dependencies] [dependencies]
phf = "0.6" phf = "0.6"
openssl = "0.5" openssl = "0.5"
time = "0.1.14"
log = "0.2" log = "0.2"
rustc-serialize = "0.3" rustc-serialize = "0.3"
byteorder = "0.3" byteorder = "0.3"
@ -39,5 +38,9 @@ version = "0.1"
optional = true optional = true
version = "0.2" version = "0.2"
[dependencies.time]
optional = true
version = "0.1.14"
[dev-dependencies] [dev-dependencies]
url = "0.2" url = "0.2"

View File

@ -53,7 +53,6 @@ extern crate log;
extern crate openssl; extern crate openssl;
extern crate phf; extern crate phf;
extern crate "rustc-serialize" as serialize; extern crate "rustc-serialize" as serialize;
extern crate time;
#[cfg(feature = "unix_socket")] #[cfg(feature = "unix_socket")]
extern crate unix_socket; extern crate unix_socket;

View File

@ -1,9 +1,11 @@
extern crate time;
use std::result::Result::{Ok, Err}; use std::result::Result::{Ok, Err};
use std::marker::Sized; use std::marker::Sized;
use std::clone::Clone; use std::clone::Clone;
use byteorder::{ReadBytesExt, WriteBytesExt, BigEndian}; use byteorder::{ReadBytesExt, WriteBytesExt, BigEndian};
use time::Timespec; use self::time::Timespec;
use std::io::prelude::*; use std::io::prelude::*;
use Result; use Result;