Skip to content

Commit 8143f7d

Browse files
committed
clippy fixes
1 parent 589f2b1 commit 8143f7d

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/webserver/database/sql_to_json.rs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ mod tests {
189189
.await?;
190190

191191
expect_json_object_equal(
192-
row_to_json(&row),
193-
serde_json::json!({
192+
&row_to_json(&row),
193+
&serde_json::json!({
194194
"small_int": 42,
195195
"integer": 42,
196196
"big_int": 42,
@@ -274,18 +274,18 @@ mod tests {
274274
.await?;
275275

276276
expect_json_object_equal(
277-
row_to_json(&row),
278-
serde_json::json!({
277+
&row_to_json(&row),
278+
&serde_json::json!({
279279
"tiny_int": 127,
280280
"small_int": 32767,
281-
"medium_int": 8388607,
282-
"signed_int": -1000000,
283-
"big_int": 9223372036854775807u64,
284-
"unsigned_int": 1000000,
281+
"medium_int": 8_388_607,
282+
"signed_int": -1_000_000,
283+
"big_int": 9_223_372_036_854_775_807_u64,
284+
"unsigned_int": 1_000_000,
285285
"tiny_int_unsigned": 255,
286-
"small_int_unsigned": 65535,
287-
"medium_int_unsigned": 16777215,
288-
"big_int_unsigned": 18446744073709551615u64,
286+
"small_int_unsigned": 65_535,
287+
"medium_int_unsigned": 16_777_215,
288+
"big_int_unsigned": 18_446_744_073_709_551_615_u64,
289289
"decimal_num": 123.45,
290290
"float_num": 42.25,
291291
"double_num": 42.25,
@@ -323,8 +323,8 @@ mod tests {
323323
.await?;
324324

325325
expect_json_object_equal(
326-
row_to_json(&row),
327-
serde_json::json!({
326+
&row_to_json(&row),
327+
&serde_json::json!({
328328
"integer": 42,
329329
"real": 42.25,
330330
"string": "xxx",
@@ -363,8 +363,8 @@ mod tests {
363363
.await?;
364364

365365
expect_json_object_equal(
366-
row_to_json(&row),
367-
serde_json::json!({
366+
&row_to_json(&row),
367+
&serde_json::json!({
368368
"true_bit": true,
369369
"false_bit": false,
370370
"null_bit": null,
@@ -386,7 +386,7 @@ mod tests {
386386
Ok(())
387387
}
388388

389-
fn expect_json_object_equal(actual: Value, expected: Value) {
389+
fn expect_json_object_equal(actual: &Value, expected: &Value) {
390390
use std::fmt::Write;
391391

392392
if actual == expected {

0 commit comments

Comments
 (0)