warning: trailing semicolon in macro used in expression position
--> serde_test/src/ser.rs:44:10
|
44 | );
| ^
...
152 | Some(&Token::BorrowedStr(_)) => assert_next_token!(self, BorrowedStr(v)),
| ---------------------------------------- in this macro invocation
|
= note: `#[warn(semicolon_in_expressions_from_macros)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: this warning originates in the macro `assert_next_token` (in Nightly builds, run with -Z macro-backtrace for more info)
warning: trailing semicolon in macro used in expression position
--> serde_test/src/ser.rs:36:76
|
36 | assert_next_token!($ser, stringify!($actual), Token::$actual, true);
| ^
...
386 | Token::TupleVariantEnd => assert_next_token!(self.ser, TupleVariantEnd),
| --------------------------------------------- in this macro invocation
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: this warning originates in the macro `assert_next_token` (in Nightly builds, run with -Z macro-backtrace for more info)
Iterator::copied was introduced in Rust 1.35, whereas serde_test
currently supports a minimum compiler version of 1.13.
error: used `cloned` where `copied` could be used instead
--> serde_test/src/de.rs:49:29
|
49 | self.tokens.first().cloned()
| ^^^^^^ help: try: `copied`
|
note: the lint level is defined here
--> serde_test/src/lib.rs:149:52
|
149 | #![cfg_attr(feature = "cargo-clippy", deny(clippy, clippy_pedantic))]
| ^^^^^^^^^^^^^^^
= note: `#[deny(clippy::cloned_instead_of_copied)]` implied by `#[deny(clippy::pedantic)]`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cloned_instead_of_copied
Before that fix following code panics, because `Token::Unit` was unexpected by test deserializer:
```
#[derive(Deserialize)]
enum E { ... }
assert_de_tokens_error::<E>(&[Token::Unit], "...");
```