aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Galenson <jgalenson@google.com>2021-08-18 17:31:15 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-08-18 17:31:15 +0000
commit068e86256e196057cb9384a4591e3cc42ceb3da7 (patch)
treebb394368ff1262d4c91811115aebb3e38298768b
parent29b529221937298b21a3a027bb55f92030d96192 (diff)
parent0f259afc3972fcef22141ef3606f230734e5db40 (diff)
downloadserde_derive-068e86256e196057cb9384a4591e3cc42ceb3da7.tar.gz
Upgrade rust/crates/serde_derive to 1.0.127 am: 1ffc9cd63d am: 000bafb727 am: 2c5bffc04e am: 0f259afc39
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/serde_derive/+/1791109 Change-Id: I7567f626ee471f5789bbb5b3ddb603ed726cea09
-rw-r--r--.cargo_vcs_info.json2
-rw-r--r--Android.bp4
-rw-r--r--Cargo.toml11
-rw-r--r--Cargo.toml.orig2
-rw-r--r--METADATA8
-rw-r--r--src/de.rs12
-rw-r--r--src/internals/ast.rs2
-rw-r--r--src/internals/attr.rs8
-rw-r--r--src/internals/check.rs4
-rw-r--r--src/lib.rs2
-rw-r--r--src/ser.rs2
11 files changed, 28 insertions, 29 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index d265e4c..9c11542 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,5 +1,5 @@
{
"git": {
- "sha1": "d9c338ec4abd1dd6fdd305e208bff1fd7faaabff"
+ "sha1": "e2f85681fea9229208e83ae873c3a9a077f4d255"
}
}
diff --git a/Android.bp b/Android.bp
index 0d9b267..1deeea6 100644
--- a/Android.bp
+++ b/Android.bp
@@ -52,7 +52,7 @@ rust_proc_macro {
}
// dependent_library ["feature_list"]
-// proc-macro2-1.0.26 "default,proc-macro"
+// proc-macro2-1.0.28 "default,proc-macro"
// quote-1.0.9 "default,proc-macro"
-// syn-1.0.72 "clone-impls,default,derive,parsing,printing,proc-macro,quote"
+// syn-1.0.74 "clone-impls,default,derive,parsing,printing,proc-macro,quote"
// unicode-xid-0.2.2 "default"
diff --git a/Cargo.toml b/Cargo.toml
index 0f9aa95..ddac15f 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,16 +3,15 @@
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
-# to registry (e.g., crates.io) dependencies
+# to registry (e.g., crates.io) dependencies.
#
-# If you believe there's an error in this file please file an
-# issue against the rust-lang/cargo repository. If you're
-# editing this file be aware that the upstream Cargo.toml
-# will likely look very different (and much more reasonable)
+# If you are reading this file be aware that the original Cargo.toml
+# will likely look very different (and much more reasonable).
+# See Cargo.toml.orig for the original contents.
[package]
name = "serde_derive"
-version = "1.0.126"
+version = "1.0.127"
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 d192547..161cc20 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,6 +1,6 @@
[package]
name = "serde_derive"
-version = "1.0.126" # remember to update html_root_url
+version = "1.0.127" # remember to update html_root_url
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"]
license = "MIT OR Apache-2.0"
description = "Macros 1.1 implementation of #[derive(Serialize, Deserialize)]"
diff --git a/METADATA b/METADATA
index 9c137c9..79f1d64 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.126.crate"
+ value: "https://static.crates.io/crates/serde_derive/serde_derive-1.0.127.crate"
}
- version: "1.0.126"
+ version: "1.0.127"
license_type: NOTICE
last_upgrade_date {
year: 2021
- month: 5
- day: 19
+ month: 8
+ day: 9
}
}
diff --git a/src/de.rs b/src/de.rs
index 3daa9d1..5d0c00f 100644
--- a/src/de.rs
+++ b/src/de.rs
@@ -475,7 +475,7 @@ fn deserialize_tuple(
};
let visit_seq = Stmts(deserialize_seq(
- &type_path, params, fields, false, cattrs, &expecting,
+ &type_path, params, fields, false, cattrs, expecting,
));
let visitor_expr = quote! {
@@ -561,7 +561,7 @@ fn deserialize_tuple_in_place(
None
};
- let visit_seq = Stmts(deserialize_seq_in_place(params, fields, cattrs, &expecting));
+ let visit_seq = Stmts(deserialize_seq_in_place(params, fields, cattrs, expecting));
let visitor_expr = quote! {
__Visitor {
@@ -922,7 +922,7 @@ fn deserialize_struct(
let expecting = cattrs.expecting().unwrap_or(&expecting);
let visit_seq = Stmts(deserialize_seq(
- &type_path, params, fields, true, cattrs, &expecting,
+ &type_path, params, fields, true, cattrs, expecting,
));
let (field_visitor, fields_stmt, visit_map) = if cattrs.has_flatten() {
@@ -1063,7 +1063,7 @@ fn deserialize_struct_in_place(
};
let expecting = cattrs.expecting().unwrap_or(&expecting);
- let visit_seq = Stmts(deserialize_seq_in_place(params, fields, cattrs, &expecting));
+ let visit_seq = Stmts(deserialize_seq_in_place(params, fields, cattrs, expecting));
let (field_visitor, fields_stmt, visit_map) =
deserialize_struct_as_struct_in_place_visitor(params, fields, cattrs);
@@ -2087,7 +2087,7 @@ fn deserialize_identifier(
) -> Fragment {
let mut flat_fields = Vec::new();
for (_, ident, aliases) in fields {
- flat_fields.extend(aliases.iter().map(|alias| (alias, ident)))
+ flat_fields.extend(aliases.iter().map(|alias| (alias, ident)));
}
let field_strs: &Vec<_> = &flat_fields.iter().map(|(name, _)| name).collect();
@@ -2285,7 +2285,7 @@ fn deserialize_identifier(
};
let visit_borrowed = if fallthrough_borrowed.is_some() || collect_other_fields {
- let fallthrough_borrowed_arm = fallthrough_borrowed.as_ref().unwrap_or(&fallthrough_arm);
+ let fallthrough_borrowed_arm = fallthrough_borrowed.as_ref().unwrap_or(fallthrough_arm);
Some(quote! {
fn visit_borrowed_str<__E>(self, __value: &'de str) -> _serde::__private::Result<Self::Value, __E>
where
diff --git a/src/internals/ast.rs b/src/internals/ast.rs
index 1afdaee..2a6950b 100644
--- a/src/internals/ast.rs
+++ b/src/internals/ast.rs
@@ -23,7 +23,7 @@ pub struct Container<'a> {
/// The fields of a struct or enum.
///
-/// Analagous to `syn::Data`.
+/// Analogous to `syn::Data`.
pub enum Data<'a> {
Enum(Vec<Variant<'a>>),
Struct(Style, Vec<Field<'a>>),
diff --git a/src/internals/attr.rs b/src/internals/attr.rs
index dcc4bf8..13f5525 100644
--- a/src/internals/attr.rs
+++ b/src/internals/attr.rs
@@ -556,7 +556,7 @@ impl Container {
// Parse `#[serde(crate = "foo")]`
Meta(NameValue(m)) if m.path == CRATE => {
if let Ok(path) = parse_lit_into_path(cx, CRATE, &m.lit) {
- serde_path.set(&m.path, path)
+ serde_path.set(&m.path, path);
}
}
@@ -1609,7 +1609,7 @@ fn get_lit_str2<'a>(
fn parse_lit_into_path(cx: &Ctxt, attr_name: Symbol, lit: &syn::Lit) -> Result<syn::Path, ()> {
let string = get_lit_str(cx, attr_name, lit)?;
parse_lit_str(string).map_err(|_| {
- cx.error_spanned_by(lit, format!("failed to parse path: {:?}", string.value()))
+ cx.error_spanned_by(lit, format!("failed to parse path: {:?}", string.value()));
})
}
@@ -1620,7 +1620,7 @@ fn parse_lit_into_expr_path(
) -> Result<syn::ExprPath, ()> {
let string = get_lit_str(cx, attr_name, lit)?;
parse_lit_str(string).map_err(|_| {
- cx.error_spanned_by(lit, format!("failed to parse path: {:?}", string.value()))
+ cx.error_spanned_by(lit, format!("failed to parse path: {:?}", string.value()));
})
}
@@ -1649,7 +1649,7 @@ fn parse_lit_into_ty(cx: &Ctxt, attr_name: Symbol, lit: &syn::Lit) -> Result<syn
cx.error_spanned_by(
lit,
format!("failed to parse type: {} = {:?}", attr_name, string.value()),
- )
+ );
})
}
diff --git a/src/internals/check.rs b/src/internals/check.rs
index 30ede1c..0e2484a 100644
--- a/src/internals/check.rs
+++ b/src/internals/check.rs
@@ -260,7 +260,7 @@ fn check_internal_tag_field_name_conflict(cx: &Ctxt, cont: &Container) {
cx.error_spanned_by(
cont.original,
format!("variant field name `{}` conflicts with internal tag", tag),
- )
+ );
};
for variant in variants {
@@ -396,7 +396,7 @@ fn member_message(member: &Member) -> String {
}
fn allow_transparent(field: &Field, derive: Derive) -> bool {
- if let Type::Path(ty) = ungroup(&field.ty) {
+ if let Type::Path(ty) = ungroup(field.ty) {
if let Some(seg) = ty.path.segments.last() {
if seg.ident == "PhantomData" {
return false;
diff --git a/src/lib.rs b/src/lib.rs
index 8daa36e..7516a90 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -13,7 +13,7 @@
//!
//! [https://serde.rs/derive.html]: https://serde.rs/derive.html
-#![doc(html_root_url = "https://docs.rs/serde_derive/1.0.126")]
+#![doc(html_root_url = "https://docs.rs/serde_derive/1.0.127")]
#![allow(unknown_lints, bare_trait_objects)]
#![deny(clippy::all, clippy::pedantic)]
// Ignored clippy lints
diff --git a/src/ser.rs b/src/ser.rs
index c663c3b..4f3e5ff 100644
--- a/src/ser.rs
+++ b/src/ser.rs
@@ -1099,7 +1099,7 @@ fn serialize_struct_visitor(
let mut field_expr = if is_enum {
quote!(#member)
} else {
- get_member(params, field, &member)
+ get_member(params, field, member)
};
let key_expr = field.attrs.name().serialize_name();