mirror of
https://github.com/serde-rs/json.git
synced 2025-12-30 05:10:37 +00:00
Resolve clippy lints in tests
This commit is contained in:
parent
fc43daa60d
commit
148ea75fed
@ -196,6 +196,12 @@ macro_rules! json_internal {
|
||||
json_internal!(@object $object [,] (,));
|
||||
};
|
||||
|
||||
// Key is fully parenthesized. This avoids clippy double_parens false
|
||||
// positives because the parenthesization may be necessary here.
|
||||
(@object $object:ident () ($key:expr) : $($rest:tt)*) => {
|
||||
json_internal!(@object $object ($key) : $($rest)*);
|
||||
};
|
||||
|
||||
// Munch a token into the current key.
|
||||
(@object $object:ident ($($key:tt)*) $tt:tt $($rest:tt)*) => {
|
||||
json_internal!(@object $object ($($key)* $tt) $($rest)*);
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp))]
|
||||
|
||||
#![cfg_attr(feature = "trace-macros", feature(trace_macros))]
|
||||
#[cfg(feature = "trace-macros")]
|
||||
trace_macros!(true);
|
||||
@ -1006,8 +1008,7 @@ fn test_parse_list() {
|
||||
("[1, [2, 3]]", (1u64, (2u64, 3u64))),
|
||||
]);
|
||||
|
||||
let v: () = from_str("[]").unwrap();
|
||||
assert_eq!(v, ());
|
||||
from_str::<()>("[]").unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user