diff --git a/Cargo.toml b/Cargo.toml index ca8f7b3..2f4f3ba 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,6 +37,7 @@ money = { path = "../money", version = "0.2" } pubsub = { path = "../pubsub" } [features] +default = ["inlines"] no-thrash = [] trace = [] debug = [] @@ -48,3 +49,4 @@ scholes = [] no-influx-buffer = [] disable-short-uuid = [] warnings = [] +inlines = [] diff --git a/src/influx.rs b/src/influx.rs index b8b7112..77f3007 100644 --- a/src/influx.rs +++ b/src/influx.rs @@ -199,18 +199,18 @@ impl Clone for InfluxWriter { impl InfluxWriter { /// Sends the `OwnedMeasurement` to the serialization thread. /// - #[inline] + #[cfg_attr(feature = "inlines", inline)] pub fn send(&self, m: OwnedMeasurement) -> Result<(), SendError>> { self.tx.send(Some(m)) } - #[inline] + #[cfg_attr(feature = "inlines", inline)] pub fn nanos(&self, d: DateTime) -> i64 { nanos(d) as i64 } - #[inline] + #[cfg_attr(feature = "inlines", inline)] pub fn dur_nanos(&self, d: Duration) -> i64 { dur_nanos(d) as i64 } - #[inline] + #[cfg_attr(feature = "inlines", inline)] pub fn dur_nanos_u64(&self, d: Duration) -> u64 { dur_nanos(d).max(0) as u64 } pub fn tx(&self) -> Sender> {