aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid LeGare <legare@google.com>2022-03-04 01:34:40 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-03-04 01:34:40 +0000
commit4a52852ba491b899ed711ff1ba6334edab9d7b28 (patch)
tree1ee94f4dd5e3df9bafb59cdec5abd10708d511be
parente035a87c8ed2764ff1f62aac6b19ec481e5bae7e (diff)
parent87a4f9576e50a3490ee3439117be311cfbda67ff (diff)
downloadserde_derive-4a52852ba491b899ed711ff1ba6334edab9d7b28.tar.gz
Update serde_derive to 1.0.136 am: 87a4f9576e
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/serde_derive/+/2005954 Change-Id: I88e37205ec520bbd5cefa197500581967ae9a40d
-rw-r--r--.cargo_vcs_info.json7
-rw-r--r--Android.bp2
-rw-r--r--Cargo.toml3
-rw-r--r--Cargo.toml.orig3
-rw-r--r--METADATA10
-rw-r--r--README.md23
-rw-r--r--crates-io.md23
-rw-r--r--src/bound.rs4
-rw-r--r--src/de.rs2
-rw-r--r--src/lib.rs4
-rw-r--r--src/pretend.rs12
11 files changed, 52 insertions, 41 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index d722bd8..7239a8b 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,5 +1,6 @@
{
"git": {
- "sha1": "65e1a50749938612cfbdb69b57fc4cf249f87149"
- }
-}
+ "sha1": "02bd79a0bada78dd88d050f6478806f001f41fb0"
+ },
+ "path_in_vcs": "serde_derive"
+} \ No newline at end of file
diff --git a/Android.bp b/Android.bp
index 5bd32d6..d7a8421 100644
--- a/Android.bp
+++ b/Android.bp
@@ -41,7 +41,7 @@ rust_proc_macro {
name: "libserde_derive",
crate_name: "serde_derive",
cargo_env_compat: true,
- cargo_pkg_version: "1.0.130",
+ cargo_pkg_version: "1.0.136",
srcs: ["src/lib.rs"],
edition: "2015",
features: ["default"],
diff --git a/Cargo.toml b/Cargo.toml
index edaf948..6fac8e3 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -10,8 +10,9 @@
# See Cargo.toml.orig for the original contents.
[package]
+rust-version = "1.31"
name = "serde_derive"
-version = "1.0.130"
+version = "1.0.136"
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"]
include = ["build.rs", "src/**/*.rs", "crates-io.md", "README.md", "LICENSE-APACHE", "LICENSE-MIT"]
description = "Macros 1.1 implementation of #[derive(Serialize, Deserialize)]"
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index 4e1d4f2..47fda7f 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,7 +1,8 @@
[package]
name = "serde_derive"
-version = "1.0.130" # remember to update html_root_url
+version = "1.0.136" # remember to update html_root_url
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"]
+rust-version = "1.31"
license = "MIT OR Apache-2.0"
description = "Macros 1.1 implementation of #[derive(Serialize, Deserialize)]"
homepage = "https://serde.rs"
diff --git a/METADATA b/METADATA
index 9e775c8..5954db1 100644
--- a/METADATA
+++ b/METADATA
@@ -7,13 +7,13 @@ third_party {
}
url {
type: ARCHIVE
- value: "https://static.crates.io/crates/serde_derive/serde_derive-1.0.130.crate"
+ value: "https://static.crates.io/crates/serde_derive/serde_derive-1.0.136.crate"
}
- version: "1.0.130"
+ version: "1.0.136"
license_type: NOTICE
last_upgrade_date {
- year: 2021
- month: 9
- day: 22
+ year: 2022
+ month: 3
+ day: 1
}
}
diff --git a/README.md b/README.md
index 14b0098..79409a3 100644
--- a/README.md
+++ b/README.md
@@ -77,17 +77,20 @@ fn main() {
Serde is one of the most widely used Rust libraries so any place that Rustaceans
congregate will be able to help you out. For chat, consider trying the
-[#general] or [#beginners] channels of the unofficial community Discord, the
-[#rust-usage] channel of the official Rust Project Discord, or the
-[#general][zulip] stream in Zulip. For asynchronous, consider the [\[rust\] tag
-on StackOverflow][stackoverflow], the [/r/rust] subreddit which has a pinned
-weekly easy questions post, or the Rust [Discourse forum][discourse]. It's
-acceptable to file a support issue in this repo but they tend not to get as many
-eyes as any of the above and may get closed without a response after some time.
-
-[#general]: https://discord.com/channels/273534239310479360/274215136414400513
-[#beginners]: https://discord.com/channels/273534239310479360/273541522815713281
+[#rust-questions] or [#rust-beginners] channels of the unofficial community
+Discord (invite: <https://discord.gg/rust-lang-community>), the [#rust-usage] or
+[#beginners] channels of the official Rust Project Discord (invite:
+<https://discord.gg/rust-lang>), or the [#general][zulip] stream in Zulip. For
+asynchronous, consider the [\[rust\] tag on StackOverflow][stackoverflow], the
+[/r/rust] subreddit which has a pinned weekly easy questions post, or the Rust
+[Discourse forum][discourse]. It's acceptable to file a support issue in this
+repo but they tend not to get as many eyes as any of the above and may get
+closed without a response after some time.
+
+[#rust-questions]: https://discord.com/channels/273534239310479360/274215136414400513
+[#rust-beginners]: https://discord.com/channels/273534239310479360/273541522815713281
[#rust-usage]: https://discord.com/channels/442252698964721669/443150878111694848
+[#beginners]: https://discord.com/channels/442252698964721669/448238009733742612
[zulip]: https://rust-lang.zulipchat.com/#narrow/stream/122651-general
[stackoverflow]: https://stackoverflow.com/questions/tagged/rust
[/r/rust]: https://www.reddit.com/r/rust
diff --git a/crates-io.md b/crates-io.md
index 0775761..b57bc5f 100644
--- a/crates-io.md
+++ b/crates-io.md
@@ -45,17 +45,20 @@ fn main() {
Serde is one of the most widely used Rust libraries so any place that Rustaceans
congregate will be able to help you out. For chat, consider trying the
-[#general] or [#beginners] channels of the unofficial community Discord, the
-[#rust-usage] channel of the official Rust Project Discord, or the
-[#general][zulip] stream in Zulip. For asynchronous, consider the [\[rust\] tag
-on StackOverflow][stackoverflow], the [/r/rust] subreddit which has a pinned
-weekly easy questions post, or the Rust [Discourse forum][discourse]. It's
-acceptable to file a support issue in this repo but they tend not to get as many
-eyes as any of the above and may get closed without a response after some time.
-
-[#general]: https://discord.com/channels/273534239310479360/274215136414400513
-[#beginners]: https://discord.com/channels/273534239310479360/273541522815713281
+[#rust-questions] or [#rust-beginners] channels of the unofficial community
+Discord (invite: <https://discord.gg/rust-lang-community>, the [#rust-usage] or
+[#beginners] channels of the official Rust Project Discord (invite:
+<https://discord.gg/rust-lang>), or the [#general][zulip] stream in Zulip. For
+asynchronous, consider the [\[rust\] tag on StackOverflow][stackoverflow], the
+[/r/rust] subreddit which has a pinned weekly easy questions post, or the Rust
+[Discourse forum][discourse]. It's acceptable to file a support issue in this
+repo but they tend not to get as many eyes as any of the above and may get
+closed without a response after some time.
+
+[#rust-questions]: https://discord.com/channels/273534239310479360/274215136414400513
+[#rust-beginners]: https://discord.com/channels/273534239310479360/273541522815713281
[#rust-usage]: https://discord.com/channels/442252698964721669/443150878111694848
+[#beginners]: https://discord.com/channels/442252698964721669/448238009733742612
[zulip]: https://rust-lang.zulipchat.com/#narrow/stream/122651-general
[stackoverflow]: https://stackoverflow.com/questions/tagged/rust
[/r/rust]: https://www.reddit.com/r/rust
diff --git a/src/bound.rs b/src/bound.rs
index 6d7402c..abca467 100644
--- a/src/bound.rs
+++ b/src/bound.rs
@@ -50,7 +50,7 @@ pub fn with_where_predicates_from_fields(
.data
.all_fields()
.filter_map(|field| from_field(&field.attrs))
- .flat_map(|predicates| predicates.to_vec());
+ .flat_map(<[syn::WherePredicate]>::to_vec);
let mut generics = generics.clone();
generics.make_where_clause().predicates.extend(predicates);
@@ -72,7 +72,7 @@ pub fn with_where_predicates_from_variants(
let predicates = variants
.iter()
.filter_map(|variant| from_variant(&variant.attrs))
- .flat_map(|predicates| predicates.to_vec());
+ .flat_map(<[syn::WherePredicate]>::to_vec);
let mut generics = generics.clone();
generics.make_where_clause().predicates.extend(predicates);
diff --git a/src/de.rs b/src/de.rs
index 7f4d7c4..ff7bc42 100644
--- a/src/de.rs
+++ b/src/de.rs
@@ -1458,7 +1458,7 @@ fn deserialize_adjacently_tagged_enum(
while let _serde::__private::Some(__k) = #next_key {
match __k {
_serde::__private::de::TagContentOtherField::Other => {
- try!(_serde::de::MapAccess::next_value::<_serde::de::IgnoredAny>(&mut __map));
+ let _ = try!(_serde::de::MapAccess::next_value::<_serde::de::IgnoredAny>(&mut __map));
continue;
},
_serde::__private::de::TagContentOtherField::Tag => {
diff --git a/src/lib.rs b/src/lib.rs
index 9bf2c36..8079bb6 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -13,9 +13,8 @@
//!
//! [https://serde.rs/derive.html]: https://serde.rs/derive.html
-#![doc(html_root_url = "https://docs.rs/serde_derive/1.0.130")]
+#![doc(html_root_url = "https://docs.rs/serde_derive/1.0.136")]
#![allow(unknown_lints, bare_trait_objects)]
-#![deny(clippy::all, clippy::pedantic)]
// Ignored clippy lints
#![allow(
// clippy false positive: https://github.com/rust-lang/rust-clippy/issues/7054
@@ -44,6 +43,7 @@
clippy::indexing_slicing,
clippy::items_after_statements,
clippy::let_underscore_drop,
+ clippy::manual_assert,
clippy::map_err_ignore,
clippy::match_same_arms,
// clippy bug: https://github.com/rust-lang/rust-clippy/issues/6984
diff --git a/src/pretend.rs b/src/pretend.rs
index c4e5874..3af6a66 100644
--- a/src/pretend.rs
+++ b/src/pretend.rs
@@ -65,11 +65,13 @@ pub fn pretend_used(cont: &Container, is_packed: bool) -> TokenStream {
fn pretend_fields_used(cont: &Container, is_packed: bool) -> TokenStream {
match &cont.data {
Data::Enum(variants) => pretend_fields_used_enum(cont, variants),
- Data::Struct(Style::Struct, fields) => if is_packed {
- pretend_fields_used_struct_packed(cont, fields)
- } else {
- pretend_fields_used_struct(cont, fields)
- },
+ Data::Struct(Style::Struct, fields) => {
+ if is_packed {
+ pretend_fields_used_struct_packed(cont, fields)
+ } else {
+ pretend_fields_used_struct(cont, fields)
+ }
+ }
Data::Struct(_, _) => quote!(),
}
}