diff options
-rw-r--r-- | .cargo_vcs_info.json | 2 | ||||
-rw-r--r-- | Android.bp | 4 | ||||
-rw-r--r-- | Cargo.toml | 11 | ||||
-rw-r--r-- | Cargo.toml.orig | 2 | ||||
-rw-r--r-- | METADATA | 8 | ||||
-rw-r--r-- | src/de.rs | 12 | ||||
-rw-r--r-- | src/internals/ast.rs | 2 | ||||
-rw-r--r-- | src/internals/attr.rs | 8 | ||||
-rw-r--r-- | src/internals/check.rs | 4 | ||||
-rw-r--r-- | src/lib.rs | 2 | ||||
-rw-r--r-- | src/ser.rs | 2 |
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" } } @@ -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" @@ -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)]" @@ -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 } } @@ -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; @@ -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 @@ -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(); |