From 785338de3732d57151cc91c1623ccfed36265fdb Mon Sep 17 00:00:00 2001 From: Jonathan Strong Date: Tue, 5 Dec 2017 00:56:26 -0500 Subject: [PATCH] adds "b" shortcut for bool --- src/influx.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/influx.rs b/src/influx.rs index 911007b..7a6afc8 100644 --- a/src/influx.rs +++ b/src/influx.rs @@ -130,6 +130,7 @@ macro_rules! measure { (@ea uuid, $meas:ident, $k:expr, $v:expr) => { $meas = $meas.add_field($k, $crate::influx::OwnedValue::Uuid($v)) }; (@ea u, $meas:ident, $k:expr, $v:expr) => { $meas = $meas.add_field($k, $crate::influx::OwnedValue::Uuid($v)) }; (@ea bool, $meas:ident, $k:expr, $v:expr) => { $meas = $meas.add_field($k, $crate::influx::OwnedValue::Boolean($v as bool)) }; + (@ea b, $meas:ident, $k:expr, $v:expr) => { $meas = $meas.add_field($k, $crate::influx::OwnedValue::Boolean($v as bool)) }; (@count_tags) => {0usize}; (@count_tags tag $($tail:tt)*) => {1usize + measure!(@count_tags $($tail)*)};