From dafab36104cee82d7ca249f5ee312bd1e95de002 Mon Sep 17 00:00:00 2001 From: Jonathan Strong Date: Fri, 11 May 2018 17:51:28 -0400 Subject: [PATCH] adds some inline annotations --- src/influx.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/influx.rs b/src/influx.rs index d6f4c1b..b8b7112 100644 --- a/src/influx.rs +++ b/src/influx.rs @@ -199,14 +199,18 @@ impl Clone for InfluxWriter { impl InfluxWriter { /// Sends the `OwnedMeasurement` to the serialization thread. /// + #[inline] pub fn send(&self, m: OwnedMeasurement) -> Result<(), SendError>> { self.tx.send(Some(m)) } + #[inline] pub fn nanos(&self, d: DateTime) -> i64 { nanos(d) as i64 } + #[inline] pub fn dur_nanos(&self, d: Duration) -> i64 { dur_nanos(d) as i64 } + #[inline] pub fn dur_nanos_u64(&self, d: Duration) -> u64 { dur_nanos(d).max(0) as u64 } pub fn tx(&self) -> Sender> {