@@ -50,7 +50,7 @@ impl LineProtoTerm<'_> {
50
50
}
51
51
52
52
/// Serializes Tag Values. InfluxDB stores tag values as strings, so we format everything to string.
53
- ///
53
+ ///
54
54
/// V2: https://docs.influxdata.com/influxdb/cloud/reference/syntax/line-protocol/#tag-set
55
55
/// V1: https://docs.influxdata.com/influxdb/v1/write_protocols/line_protocol_tutorial/#data-types
56
56
fn escape_tag_value ( v : & Type ) -> String {
@@ -78,31 +78,26 @@ impl LineProtoTerm<'_> {
78
78
}
79
79
80
80
/// Escapes a Rust bool to InfluxDB Line Protocol
81
- ///
81
+ ///
82
82
/// https://docs.influxdata.com/influxdb/cloud/reference/syntax/line-protocol/#boolean
83
83
/// Stores true or false values.
84
84
fn escape_boolean ( v : & bool ) -> String {
85
- if * v {
86
- "true"
87
- } else {
88
- "false"
89
- }
90
- . to_string ( )
85
+ if * v { "true" } else { "false" } . to_string ( )
91
86
}
92
87
93
88
/// Escapes a Rust i64 to InfluxDB Line Protocol
94
- ///
89
+ ///
95
90
/// https://docs.influxdata.com/influxdb/cloud/reference/syntax/line-protocol/#integer
96
91
/// Signed 64-bit integers. Trailing i on the number specifies an integer.
97
92
fn escape_signed_integer ( v : & i64 ) -> String {
98
93
format ! ( "{v}i" )
99
94
}
100
95
101
96
/// Escapes a Rust u64 to InfluxDB Line Protocol
102
- ///
97
+ ///
103
98
/// https://docs.influxdata.com/influxdb/cloud/reference/syntax/line-protocol/#uinteger
104
99
/// Unsigned 64-bit integers. Trailing u on the number specifies an unsigned integer.
105
- ///
100
+ ///
106
101
/// InfluxDB version 1 does not know unsigned, we fallback to (signed) integer:
107
102
/// https://docs.influxdata.com/influxdb/v1/write_protocols/line_protocol_tutorial/#data-types
108
103
fn escape_unsigned_integer ( v : & u64 , use_v2 : bool ) -> String {
0 commit comments