@@ -62,7 +62,7 @@ impl LineProtoTerm<'_> {
6262 Float ( v) => format ! ( r#""{}""# , v. to_string( ) ) ,
6363 SignedInteger ( v) => format ! ( r#""{}""# , v) ,
6464 UnsignedInteger ( v) => format ! ( r#""{}""# , v) ,
65- Text ( v) => format ! ( r#""{}""# , Self :: escape_any( v, & * SLASHES ) ) ,
65+ Text ( v) => Self :: escape_any ( v, & * SLASHES ) ,
6666 }
6767 }
6868
@@ -80,19 +80,19 @@ mod test {
8080 fn test ( ) {
8181 assert_eq ! (
8282 TagValue ( & Type :: Text ( "this is my special string" . into( ) ) ) . escape( ) ,
83- r#"" this\ is\ my\ special\ string" "#
83+ r#"this\ is\ my\ special\ string"#
8484 ) ;
8585 assert_eq ! (
8686 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"#
8888 ) ;
8989 assert_eq ! (
9090 TagValue ( & Type :: Text ( "no_escapes" . into( ) ) ) . escape( ) ,
91- r#"" no_escapes" "#
91+ r#"no_escapes"#
9292 ) ;
9393 assert_eq ! (
9494 TagValue ( & Type :: Text ( "some,commas,here" . into( ) ) ) . escape( ) ,
95- r#"" some\,commas\,here" "#
95+ r#"some\,commas\,here"#
9696 ) ;
9797
9898 assert_eq ! ( Measurement ( r#"wea", ther"# ) . escape( ) , r#"wea"\,\ ther"# ) ;
@@ -120,6 +120,6 @@ mod test {
120120 fn test_empty_tag_value ( ) {
121121 // InfluxDB doesn't support empty tag values. But that's a job
122122 // 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#""# ) ;
124124 }
125125}
0 commit comments