@@ -53,7 +53,7 @@ async fn test_connection_error() {
53
53
let client =
54
54
Client :: new ( "http://127.0.0.1:10086" , test_name) . with_auth ( "nopriv_user" , "password" ) ;
55
55
let read_query = ReadQuery :: new ( "SELECT * FROM weather" ) ;
56
- let read_result = client. query ( & read_query) . await ;
56
+ let read_result = client. query ( read_query) . await ;
57
57
assert_result_err ( & read_result) ;
58
58
match read_result {
59
59
Err ( Error :: ConnectionError { .. } ) => { }
@@ -78,7 +78,7 @@ async fn test_authed_write_and_read() {
78
78
Client :: new ( "http://127.0.0.1:9086" , TEST_NAME ) . with_auth ( "admin" , "password" ) ;
79
79
let query = format ! ( "CREATE DATABASE {}" , TEST_NAME ) ;
80
80
client
81
- . query ( & ReadQuery :: new ( query) )
81
+ . query ( ReadQuery :: new ( query) )
82
82
. await
83
83
. expect ( "could not setup db" ) ;
84
84
@@ -87,11 +87,11 @@ async fn test_authed_write_and_read() {
87
87
let write_query = Timestamp :: Hours ( 11 )
88
88
. into_query ( "weather" )
89
89
. add_field ( "temperature" , 82 ) ;
90
- let write_result = client. query ( & write_query) . await ;
90
+ let write_result = client. query ( write_query) . await ;
91
91
assert_result_ok ( & write_result) ;
92
92
93
93
let read_query = ReadQuery :: new ( "SELECT * FROM weather" ) ;
94
- let read_result = client. query ( & read_query) . await ;
94
+ let read_result = client. query ( read_query) . await ;
95
95
assert_result_ok ( & read_result) ;
96
96
assert ! (
97
97
!read_result. unwrap( ) . contains( "error" ) ,
@@ -104,7 +104,7 @@ async fn test_authed_write_and_read() {
104
104
let query = format ! ( "DROP DATABASE {}" , TEST_NAME ) ;
105
105
106
106
client
107
- . query ( & ReadQuery :: new ( query) )
107
+ . query ( ReadQuery :: new ( query) )
108
108
. await
109
109
. expect ( "could not clean up db" ) ;
110
110
} ,
@@ -126,7 +126,7 @@ async fn test_wrong_authed_write_and_read() {
126
126
Client :: new ( "http://127.0.0.1:9086" , TEST_NAME ) . with_auth ( "admin" , "password" ) ;
127
127
let query = format ! ( "CREATE DATABASE {}" , TEST_NAME ) ;
128
128
client
129
- . query ( & ReadQuery :: new ( query) )
129
+ . query ( ReadQuery :: new ( query) )
130
130
. await
131
131
. expect ( "could not setup db" ) ;
132
132
@@ -135,7 +135,7 @@ async fn test_wrong_authed_write_and_read() {
135
135
let write_query = Timestamp :: Hours ( 11 )
136
136
. into_query ( "weather" )
137
137
. add_field ( "temperature" , 82 ) ;
138
- let write_result = client. query ( & write_query) . await ;
138
+ let write_result = client. query ( write_query) . await ;
139
139
assert_result_err ( & write_result) ;
140
140
match write_result {
141
141
Err ( Error :: AuthorizationError ) => { }
@@ -146,7 +146,7 @@ async fn test_wrong_authed_write_and_read() {
146
146
}
147
147
148
148
let read_query = ReadQuery :: new ( "SELECT * FROM weather" ) ;
149
- let read_result = client. query ( & read_query) . await ;
149
+ let read_result = client. query ( read_query) . await ;
150
150
assert_result_err ( & read_result) ;
151
151
match read_result {
152
152
Err ( Error :: AuthorizationError ) => { }
@@ -159,7 +159,7 @@ async fn test_wrong_authed_write_and_read() {
159
159
let client = Client :: new ( "http://127.0.0.1:9086" , TEST_NAME )
160
160
. with_auth ( "nopriv_user" , "password" ) ;
161
161
let read_query = ReadQuery :: new ( "SELECT * FROM weather" ) ;
162
- let read_result = client. query ( & read_query) . await ;
162
+ let read_result = client. query ( read_query) . await ;
163
163
assert_result_err ( & read_result) ;
164
164
match read_result {
165
165
Err ( Error :: AuthenticationError ) => { }
@@ -174,7 +174,7 @@ async fn test_wrong_authed_write_and_read() {
174
174
Client :: new ( "http://127.0.0.1:9086" , TEST_NAME ) . with_auth ( "admin" , "password" ) ;
175
175
let query = format ! ( "DROP DATABASE {}" , TEST_NAME ) ;
176
176
client
177
- . query ( & ReadQuery :: new ( query) )
177
+ . query ( ReadQuery :: new ( query) )
178
178
. await
179
179
. expect ( "could not clean up db" ) ;
180
180
} ,
@@ -196,14 +196,14 @@ async fn test_non_authed_write_and_read() {
196
196
Client :: new ( "http://127.0.0.1:9086" , TEST_NAME ) . with_auth ( "admin" , "password" ) ;
197
197
let query = format ! ( "CREATE DATABASE {}" , TEST_NAME ) ;
198
198
client
199
- . query ( & ReadQuery :: new ( query) )
199
+ . query ( ReadQuery :: new ( query) )
200
200
. await
201
201
. expect ( "could not setup db" ) ;
202
202
let non_authed_client = Client :: new ( "http://127.0.0.1:9086" , TEST_NAME ) ;
203
203
let write_query = Timestamp :: Hours ( 11 )
204
204
. into_query ( "weather" )
205
205
. add_field ( "temperature" , 82 ) ;
206
- let write_result = non_authed_client. query ( & write_query) . await ;
206
+ let write_result = non_authed_client. query ( write_query) . await ;
207
207
assert_result_err ( & write_result) ;
208
208
match write_result {
209
209
Err ( Error :: AuthorizationError ) => { }
@@ -214,7 +214,7 @@ async fn test_non_authed_write_and_read() {
214
214
}
215
215
216
216
let read_query = ReadQuery :: new ( "SELECT * FROM weather" ) ;
217
- let read_result = non_authed_client. query ( & read_query) . await ;
217
+ let read_result = non_authed_client. query ( read_query) . await ;
218
218
assert_result_err ( & read_result) ;
219
219
match read_result {
220
220
Err ( Error :: AuthorizationError ) => { }
@@ -229,7 +229,7 @@ async fn test_non_authed_write_and_read() {
229
229
Client :: new ( "http://127.0.0.1:9086" , TEST_NAME ) . with_auth ( "admin" , "password" ) ;
230
230
let query = format ! ( "DROP DATABASE {}" , TEST_NAME ) ;
231
231
client
232
- . query ( & ReadQuery :: new ( query) )
232
+ . query ( ReadQuery :: new ( query) )
233
233
. await
234
234
. expect ( "could not clean up db" ) ;
235
235
} ,
@@ -252,11 +252,11 @@ async fn test_write_and_read_field() {
252
252
let write_query = Timestamp :: Hours ( 11 )
253
253
. into_query ( "weather" )
254
254
. add_field ( "temperature" , 82 ) ;
255
- let write_result = client. query ( & write_query) . await ;
255
+ let write_result = client. query ( write_query) . await ;
256
256
assert_result_ok ( & write_result) ;
257
257
258
258
let read_query = ReadQuery :: new ( "SELECT * FROM weather" ) ;
259
- let read_result = client. query ( & read_query) . await ;
259
+ let read_result = client. query ( read_query) . await ;
260
260
assert_result_ok ( & read_result) ;
261
261
assert ! (
262
262
!read_result. unwrap( ) . contains( "error" ) ,
@@ -292,7 +292,7 @@ async fn test_write_and_read_option() {
292
292
. into_query ( "weather" )
293
293
. add_field ( "temperature" , 82 )
294
294
. add_field ( "wind_strength" , <Option < u64 > >:: None ) ;
295
- let write_result = client. query ( & write_query) . await ;
295
+ let write_result = client. query ( write_query) . await ;
296
296
assert_result_ok ( & write_result) ;
297
297
298
298
#[ derive( Deserialize , Debug , PartialEq ) ]
@@ -351,7 +351,7 @@ async fn test_json_query() {
351
351
let write_query = Timestamp :: Hours ( 11 )
352
352
. into_query ( "weather" )
353
353
. add_field ( "temperature" , 82 ) ;
354
- let write_result = client. query ( & write_query) . await ;
354
+ let write_result = client. query ( write_query) . await ;
355
355
assert_result_ok ( & write_result) ;
356
356
357
357
#[ derive( Deserialize , Debug , PartialEq ) ]
@@ -404,7 +404,7 @@ async fn test_json_query_tagged() {
404
404
. into_query ( "weather" )
405
405
. add_tag ( "location" , "London" )
406
406
. add_field ( "temperature" , 82 ) ;
407
- let write_result = client. query ( & write_query) . await ;
407
+ let write_result = client. query ( write_query) . await ;
408
408
assert_result_ok ( & write_result) ;
409
409
410
410
#[ derive( Deserialize , Debug , PartialEq ) ]
@@ -476,9 +476,9 @@ async fn test_json_query_vec() {
476
476
. into_query ( "temperature_vec" )
477
477
. add_field ( "temperature" , 18 ) ;
478
478
479
- let _write_result = client. query ( & write_query1) . await ;
480
- let _write_result2 = client. query ( & write_query2) . await ;
481
- let _write_result2 = client. query ( & write_query3) . await ;
479
+ let _write_result = client. query ( write_query1) . await ;
480
+ let _write_result2 = client. query ( write_query2) . await ;
481
+ let _write_result2 = client. query ( write_query3) . await ;
482
482
483
483
#[ derive( Deserialize , Debug , PartialEq ) ]
484
484
struct Weather {
@@ -536,8 +536,8 @@ async fn test_serde_multi_query() {
536
536
. into_query ( "humidity" )
537
537
. add_field ( "humidity" , 69 ) ;
538
538
539
- let write_result = client. query ( & write_query) . await ;
540
- let write_result2 = client. query ( & write_query2) . await ;
539
+ let write_result = client. query ( write_query) . await ;
540
+ let write_result2 = client. query ( write_query2) . await ;
541
541
assert_result_ok ( & write_result) ;
542
542
assert_result_ok ( & write_result2) ;
543
543
0 commit comments