Browse Source

disable-short-uuid feat

master
Jonathan Strong 6 years ago
parent
commit
752f6374bd
2 changed files with 6 additions and 0 deletions
  1. +1
    -0
      Cargo.toml
  2. +5
    -0
      src/influx.rs

+ 1
- 0
Cargo.toml View File

@@ -38,3 +38,4 @@ harrison = []
washington = [] washington = []
scholes = [] scholes = []
no-influx-buffer = [] no-influx-buffer = []
disable-short-uuid = []

+ 5
- 0
src/influx.rs View File

@@ -482,7 +482,12 @@ pub fn serialize_owned(measurement: &OwnedMeasurement, line: &mut String) {
OwnedValue::Float(ref f) => line.push_str(&format!("{}", f)), OwnedValue::Float(ref f) => line.push_str(&format!("{}", f)),
OwnedValue::Boolean(ref b) => line.push_str(as_boolean(b)), OwnedValue::Boolean(ref b) => line.push_str(as_boolean(b)),
OwnedValue::D128(ref d) => line.push_str(&format!("{}", d)), OwnedValue::D128(ref d) => line.push_str(&format!("{}", d)),

#[cfg(not(feature = "disable-short-uuid"))]
OwnedValue::Uuid(ref u) => line.push_str(&format!("\"{}\"", &u.to_string()[..8])), OwnedValue::Uuid(ref u) => line.push_str(&format!("\"{}\"", &u.to_string()[..8])),

#[cfg(feature = "disable-short-uuid")]
OwnedValue::Uuid(ref u) => line.push_str(&format!("\"{}\"", u)),
}; };
}; };




Loading…
Cancel
Save