mirror of https://github.com/ctz/rustls
Make log crate dependency optional (issue #22)
This commit is contained in:
parent
d9d6f80fae
commit
1175caa3d0
|
@ -12,11 +12,16 @@ repository = "https://github.com/ctz/rustls"
|
|||
untrusted = "0.3.1"
|
||||
time = "0.1.35"
|
||||
base64 = "~0.2.0"
|
||||
log = "0.3.6"
|
||||
log = { version = "0.3.6", optional = true }
|
||||
ring = { version = "0.4", features = ["rsa_signing"] }
|
||||
webpki = "0.3.0"
|
||||
|
||||
[features]
|
||||
default = ["logging"]
|
||||
logging = ["log"]
|
||||
|
||||
[dev-dependencies]
|
||||
log = "0.3.6"
|
||||
env_logger = "0.3.3"
|
||||
mio = "0.5.1"
|
||||
docopt = "0.6"
|
||||
|
|
12
src/lib.rs
12
src/lib.rs
|
@ -173,10 +173,20 @@ extern crate untrusted;
|
|||
/* rust-base64 for pemfile module. */
|
||||
extern crate base64;
|
||||
|
||||
/* log for logging. */
|
||||
/* log for logging (optional). */
|
||||
#[cfg(feature = "logging")]
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
||||
#[cfg(not(feature = "logging"))]
|
||||
#[macro_use]
|
||||
mod compile_out_log {
|
||||
macro_rules! debug ( ($($tt:tt)*) => {{}} );
|
||||
macro_rules! info ( ($($tt:tt)*) => {{}} );
|
||||
macro_rules! warn ( ($($tt:tt)*) => {{}} );
|
||||
macro_rules! error ( ($($tt:tt)*) => {{}} );
|
||||
}
|
||||
|
||||
mod util;
|
||||
#[macro_use]
|
||||
mod msgs;
|
||||
|
|
Loading…
Reference in New Issue