Browse Source

adds "b" shortcut for bool

master
Jonathan Strong 7 years ago
parent
commit
785338de37
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      src/influx.rs

+ 1
- 0
src/influx.rs View File

@@ -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)*)};


Loading…
Cancel
Save