David Tolnay
01ded9f405
Declare minimum Rust version in Cargo metadata
2021-10-02 02:43:22 -04:00
David Tolnay
5c785eee58
Ignore if_then_panic clippy lint
...
error: only a `panic!` in `if`-then statement
--> serde_derive/src/internals/ctxt.rs:58:9
|
58 | / if !thread::panicking() && self.errors.borrow().is_some() {
59 | | panic!("forgot to check for errors");
60 | | }
| |_________^ help: try: `assert!(!!thread::panicking() && self.errors.borrow().is_some(), "forgot to check for errors");`
|
note: the lint level is defined here
--> serde_derive/src/lib.rs:18:9
|
18 | #![deny(clippy::all, clippy::pedantic)]
| ^^^^^^^^^^^
= note: `#[deny(clippy::if_then_panic)]` implied by `#[deny(clippy::all)]`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_then_panic
error: only a `panic!` in `if`-then statement
--> serde_test/src/assert.rs:73:5
|
73 | / if ser.remaining() > 0 {
74 | | panic!("{} remaining tokens", ser.remaining());
75 | | }
| |_____^ help: try: `assert!(!ser.remaining() > 0, "{} remaining tokens", ser.remaining());`
|
note: the lint level is defined here
--> serde_test/src/lib.rs:149:44
|
149 | #![cfg_attr(feature = "cargo-clippy", deny(clippy, clippy_pedantic))]
| ^^^^^^
= note: `#[deny(clippy::if_then_panic)]` implied by `#[deny(clippy::all)]`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_then_panic
error: only a `panic!` in `if`-then statement
--> serde_test/src/assert.rs:126:5
|
126 | / if ser.remaining() > 0 {
127 | | panic!("{} remaining tokens", ser.remaining());
128 | | }
| |_____^ help: try: `assert!(!ser.remaining() > 0, "{} remaining tokens", ser.remaining());`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_then_panic
error: only a `panic!` in `if`-then statement
--> serde_test/src/assert.rs:166:5
|
166 | / if de.remaining() > 0 {
167 | | panic!("{} remaining tokens", de.remaining());
168 | | }
| |_____^ help: try: `assert!(!de.remaining() > 0, "{} remaining tokens", de.remaining());`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_then_panic
error: only a `panic!` in `if`-then statement
--> serde_test/src/assert.rs:180:5
|
180 | / if de.remaining() > 0 {
181 | | panic!("{} remaining tokens", de.remaining());
182 | | }
| |_____^ help: try: `assert!(!de.remaining() > 0, "{} remaining tokens", de.remaining());`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_then_panic
error: only a `panic!` in `if`-then statement
--> serde_test/src/assert.rs:220:5
|
220 | / if de.remaining() > 0 {
221 | | panic!("{} remaining tokens", de.remaining());
222 | | }
| |_____^ help: try: `assert!(!de.remaining() > 0, "{} remaining tokens", de.remaining());`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_then_panic
error: only a `panic!` in `if`-then statement
--> test_suite/tests/test_de.rs:1349:9
|
1349 | / if de.remaining() > 0 {
1350 | | panic!("{} remaining tokens", de.remaining());
1351 | | }
| |_________^ help: try: `assert!(!de.remaining() > 0, "{} remaining tokens", de.remaining());`
|
= note: `-D clippy::if-then-panic` implied by `-D clippy::all`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_then_panic
2021-09-30 00:31:49 -04:00
David Tolnay
65e1a50749
Release 1.0.130
2021-08-28 11:31:38 -07:00
David Tolnay
2b92c80cc1
Release 1.0.129
2021-08-23 15:01:24 -07:00
David Tolnay
a587eb8953
Release 1.0.128
2021-08-21 10:39:32 -07:00
David Tolnay
e2f85681fe
Release 1.0.127
2021-07-30 20:59:13 -07:00
David Tolnay
8b840c3030
Resolve semicolon_in_expressions_from_macros warning in serde_test
...
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)
2021-07-30 20:58:07 -07:00
David Tolnay
d9c338ec4a
Release 1.0.126
2021-05-12 10:18:26 -07:00
David Tolnay
6366f17da7
Ignore clone_instead_of_copied pedantic clippy lint
...
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
2021-04-24 19:26:19 -07:00
David Tolnay
e9270e59f0
Release 1.0.125
2021-03-22 16:15:57 -07:00
David Tolnay
5a8dcac2ed
Release 1.0.124
2021-03-05 19:55:40 -08:00
David Tolnay
beb21cb640
Ignore new missing_panics_doc pedantic clippy lint
2021-02-03 20:07:44 -08:00
David Tolnay
3d6c4149b1
Release 1.0.123
2021-01-25 13:43:11 -08:00
David Tolnay
ffed19243d
Release 1.0.122
2021-01-24 16:17:29 -08:00
David Tolnay
84ad76b2e5
Ignore too_many_lines clippy pedantic lint in serde_test
...
error: this function has too many lines (107/100)
--> serde_test/src/de.rs:128:5
|
128 | / fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Error>
129 | | where
130 | | V: Visitor<'de>,
131 | | {
... |
238 | | }
239 | | }
| |_____^
|
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::too_many_lines)]` implied by `#[deny(clippy::pedantic)]`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_lines
2021-01-23 20:04:30 -08:00
David Tolnay
e6b6602a42
Merge pull request 1914 from Mingun/seq-other
2021-01-23 19:50:39 -08:00
David Tolnay
fa6712d2bf
Merge pull request #1918 from Mingun/fix-serde-test
...
Fix incorrect message in serializer tokens and correctly implement next_entry_seed
2021-01-23 15:02:32 -08:00
David Tolnay
012ea8eb84
Keep conditional compilation cfg naming consistent with serde crate
...
The serde crate's build.rs uses names like `core_duration` or
`integer128`, not `has_core_duration` / `has_integer128`.
2021-01-23 14:57:12 -08:00
David Tolnay
9add5812e2
Update track_caller cfg link to show what version it's in
2021-01-23 14:56:03 -08:00
David Tolnay
5fd52100b6
Merge pull request #1920 from Mingun/track_caller
...
Show correct location in error messages by tracking caller of utility `assert_tokens` functions
2021-01-23 14:54:24 -08:00
David Tolnay
88ee470a1c
Format PR #1916 with rustfmt 1.4.32
2021-01-23 13:39:12 -08:00
David Tolnay
a5ecbdb4f4
Merge pull request 1916 from Mingun/expecting-customize
2021-01-23 13:38:45 -08:00
David Tolnay
bd588db067
Release 1.0.121
2021-01-23 13:17:08 -08:00
David Tolnay
398fba9b1e
Release 1.0.120
2021-01-18 22:55:13 -08:00
David Tolnay
4c89cf89fd
Release 1.0.119
2021-01-11 12:13:57 -08:00
David Tolnay
e797431268
Release 1.0.118
2020-12-05 13:45:47 -08:00
Mingun
5cbc8439ea
Show correct location in error messages by tracking caller of utility assert_tokens
functions
2020-10-28 09:11:54 +05:00
Mingun
97c350a95e
Forward Readable|Compact next_entry_seed to underlying next_entry_seed instead of usage of default implementation
...
Difference is noticeable for deserializers that rely on call of next_entry_seed
(for example, current quick-xml supports only next_entry_seed)
2020-10-28 01:05:27 +05:00
Mingun
920a77ad61
Fix incorrect messages in serialized tokens assertions
...
Serializer contains expected tokens, called methods provide actual tokens
2020-10-28 01:05:27 +05:00
Mingun
23c14e5f33
Allow to run assert_de_tokens_error on token sequence that is not expected by enum deserializer
...
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], "...");
```
2020-10-22 23:50:48 +05:00
Mingun
e80571751d
Allow borrowed and owned strings and bytes and u8, u16, u64 for variant keys in serde_test
2020-10-22 20:43:14 +05:00
David Tolnay
fc3f104c4a
Release 1.0.117
2020-10-15 09:49:03 -07:00
David Tolnay
b539cb45d7
Release 1.0.116
2020-09-11 11:56:19 -07:00
David Tolnay
2ef60b62ac
Release 1.0.115
2020-08-10 15:51:19 -07:00
David Tolnay
9c6f0c3a0e
Release 1.0.114
2020-06-21 17:31:02 -07:00
David Tolnay
7350b58f5c
Release 1.0.113
2020-06-19 13:31:38 -07:00
David Tolnay
f3520e526b
Release 1.0.112
2020-06-14 11:16:04 -07:00
David Tolnay
0856a2c101
No need to specify Cargo.toml in package.include
...
Cargo.toml is always included in the published crate.
2020-06-10 01:21:19 -07:00
David Tolnay
9f331cc257
Release 1.0.111
2020-05-29 18:53:07 -07:00
David Tolnay
078b171c1b
Release 1.0.110
2020-05-09 23:06:56 -07:00
David Tolnay
b97a183e82
Release 1.0.109
2020-05-09 21:00:51 -07:00
David Tolnay
ea2789df0f
Release 1.0.108
2020-05-09 17:53:23 -07:00
David Tolnay
f63acb52dc
Release 1.0.107
2020-05-08 15:45:36 -07:00
David Tolnay
60522937af
Remove CI badge from Cargo.toml
...
Support for badges has been deprecated by crates.io.
2020-05-01 21:11:02 -07:00
David Tolnay
d1564525ad
Release 1.0.106
2020-04-03 14:26:42 -07:00
David Tolnay
69653a762d
Release 1.0.105
2020-03-18 11:42:51 -07:00
David Tolnay
078e88b223
Select a single docs.rs build target
2020-03-17 13:31:35 -07:00
David Tolnay
234fbfd7e3
Release 1.0.104
2019-12-15 20:01:04 -08:00
David Tolnay
43a9f59c18
Release 1.0.103
2019-11-24 16:15:13 -08:00
David Tolnay
2ceabad360
Release 1.0.102
2019-10-27 13:39:27 -07:00