@@ -62,7 +62,7 @@ impl LineProtoTerm<'_> {
62
62
Float ( v) => format ! ( r#""{}""# , v. to_string( ) ) ,
63
63
SignedInteger ( v) => format ! ( r#""{}""# , v) ,
64
64
UnsignedInteger ( v) => format ! ( r#""{}""# , v) ,
65
- Text ( v) => format ! ( r#"{}"# , Self :: escape_any( v, & * SLASHES ) ) ,
65
+ Text ( v) => Self :: escape_any ( v, & * SLASHES ) ,
66
66
}
67
67
}
68
68
@@ -80,19 +80,19 @@ mod test {
80
80
fn test ( ) {
81
81
assert_eq ! (
82
82
TagValue ( & Type :: Text ( "this is my special string" . into( ) ) ) . escape( ) ,
83
- r#"" this\ is\ my\ special\ string" "#
83
+ r#"this\ is\ my\ special\ string"#
84
84
) ;
85
85
assert_eq ! (
86
86
TagValue ( & Type :: Text ( "a tag w=i th == tons of escapes" . into( ) ) ) . escape( ) ,
87
- r#"" a\ tag\ w\=i\ th\ \=\=\ tons\ of\ escapes" "#
87
+ r#"a\ tag\ w\=i\ th\ \=\=\ tons\ of\ escapes"#
88
88
) ;
89
89
assert_eq ! (
90
90
TagValue ( & Type :: Text ( "no_escapes" . into( ) ) ) . escape( ) ,
91
- r#"" no_escapes" "#
91
+ r#"no_escapes"#
92
92
) ;
93
93
assert_eq ! (
94
94
TagValue ( & Type :: Text ( "some,commas,here" . into( ) ) ) . escape( ) ,
95
- r#"" some\,commas\,here" "#
95
+ r#"some\,commas\,here"#
96
96
) ;
97
97
98
98
assert_eq ! ( Measurement ( r#"wea", ther"# ) . escape( ) , r#"wea"\,\ ther"# ) ;
@@ -120,6 +120,6 @@ mod test {
120
120
fn test_empty_tag_value ( ) {
121
121
// InfluxDB doesn't support empty tag values. But that's a job
122
122
// of a calling site to validate an entire write request.
123
- assert_eq ! ( TagValue ( & Type :: Text ( "" . into( ) ) ) . escape( ) , r#"""" # ) ;
123
+ assert_eq ! ( TagValue ( & Type :: Text ( "" . into( ) ) ) . escape( ) , r#""# ) ;
124
124
}
125
125
}
0 commit comments