Fix new clippy warnings (#2760)

* Fix new clippy warnings

* Fork serde-hjson and bring in

* Fork serde-hjson and bring in

* Fix clippy lint again
This commit is contained in:
Jonathan Turner
2020-11-22 13:37:16 +13:00
committed by GitHub
parent 63d4df9810
commit 930f9f0063
36 changed files with 5176 additions and 952 deletions

View File

@ -150,18 +150,24 @@ fn uniq_counting() {
| from json
| wrap item
| uniq --count
| where item == A
| get count
"#
));
let expected = nu!(
assert_eq!(actual.out, "2");
let actual = nu!(
cwd: "tests/fixtures/formats", pipeline(
r#"
echo '[{"item": "A", "count": 2}, {"item": "B", "count": 1}]'
| from json
echo '["A", "B", "A"]'
| from json
| wrap item
| uniq --count
| where item == B
| get count
"#
));
print!("{}", actual.out);
print!("{}", expected.out);
assert_eq!(actual.out, expected.out);
assert_eq!(actual.out, "1");
}
#[test]