The following changes are included:
- Delete per-file license notices at the top of each file.
- Delete the first paragraph of LICENSE-MIT (an inaccurate
pseudo-copyright line), leaving only the text of the MIT license.
Nothing about the license of Serde code has changed, only our
understanding of how to correctly communicate that license has changed.
This mirrors an equivalent change being applied in the rust-lang/rust
repository.
When originally added, this test used to contain a `#![plugin(clippy)]`.
This was removed at some point along the way, at which point this test
no longer tests anything. It prints:
warning: unknown lint: `identity_op`
--> src/main.rs:1:9
|
1 | #![deny(identity_op)]
| ^^^^^^^^^^^
|
= note: #[warn(unknown_lints)] on by default
which is swallowed and ignored by compiletest.
Nowadays Clippy handles warnings inside of macro expanded code
intelligently and this is something they would be responsible for
testing.
Before this change, flattening anything after a flattened map was
nonsensical because the later flattened field would always observe no
input fields.
#[derive(Deserialize)]
struct S {
#[serde(flatten)]
map: Map<K, V>,
#[serde(flatten)]
other: Other, // always empty
}
This change makes a flattened map not consume any of the input fields,
leaving them available to later flattened fields in the same struct. The
new behavior is useful when two flattened fields that both use
deserialize_map care about disjoint subsets of the fields in the input.
#[derive(Deserialize)]
struct S {
// Looks at fields with a "player1_" prefix.
#[serde(flatten, with = "prefix_player1")]
player1: Player,
// Looks at fields with a "player2_" prefix.
#[serde(flatten, with = "prefix_player2")]
player2: Player,
}