From 77a1fd79d429170b194ea05b84021fc927e5f81a Mon Sep 17 00:00:00 2001 From: Jonathan Strong Date: Fri, 21 Sep 2018 16:53:38 -0400 Subject: [PATCH] hide latency mod behind feature gate --- Cargo.toml | 3 ++- src/lib.rs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index bc973ea..9f72bdf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ decimal = { path = "../decimal", version = "2" } #windows = { path = "../windows", version = "0.2" } money = { path = "../money", version = "0.3" } -pubsub = { path = "../pubsub" } +pubsub = { path = "../pubsub", optional = true } [features] default = ["inlines"] @@ -51,3 +51,4 @@ no-influx-buffer = [] disable-short-uuid = [] warnings = [] inlines = [] +latency = ["pubsub"] diff --git a/src/lib.rs b/src/lib.rs index 20d028e..7389b0c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -26,7 +26,7 @@ extern crate num; extern crate dirs; #[cfg(feature = "zmq")] extern crate zmq; - +#[cfg(feature = "latency")] extern crate pubsub as pub_sub; use chrono::{DateTime, Utc, TimeZone as ChronoTZ}; @@ -43,6 +43,7 @@ use uuid::Uuid; pub mod influx; #[cfg(feature = "warnings")] pub mod warnings; +#[cfg(feature = "latency")] pub mod latency; pub mod hist;