mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-24 23:57:57 +00:00
Merge branch 'v0.6.x'
# Conflicts: # serde_codegen/src/de.rs
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "serde_codegen"
|
||||
version = "0.6.12"
|
||||
version = "0.6.13"
|
||||
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>"]
|
||||
license = "MIT/Apache-2.0"
|
||||
description = "Macros to auto-generate implementations for the serde framework"
|
||||
@@ -16,13 +16,13 @@ nightly-testing = ["clippy"]
|
||||
with-syntex = ["quasi/with-syntex", "quasi_codegen", "quasi_codegen/with-syntex", "syntex", "syntex_syntax"]
|
||||
|
||||
[build-dependencies]
|
||||
quasi_codegen = { version = "^0.5.0", optional = true }
|
||||
syntex = { version = "^0.27.0", optional = true }
|
||||
quasi_codegen = { version = "^0.6.0", optional = true }
|
||||
syntex = { version = "^0.28.0", optional = true }
|
||||
|
||||
[dependencies]
|
||||
aster = { version = "^0.11.0", default-features = false }
|
||||
clippy = { version = "^0.0.39", optional = true }
|
||||
quasi = { version = "^0.5.0", default-features = false }
|
||||
quasi_macros = { version = "^0.5.0", optional = true }
|
||||
syntex = { version = "^0.27.0", optional = true }
|
||||
syntex_syntax = { version = "^0.27.0", optional = true }
|
||||
aster = { version = "^0.12.0", default-features = false }
|
||||
clippy = { version = "^0.0.41", optional = true }
|
||||
quasi = { version = "^0.6.0", default-features = false }
|
||||
quasi_macros = { version = "^0.6.0", optional = true }
|
||||
syntex = { version = "^0.28.0", optional = true }
|
||||
syntex_syntax = { version = "^0.28.0", optional = true }
|
||||
|
||||
@@ -397,7 +397,7 @@ fn deserialize_seq(
|
||||
struct_path: ast::Path,
|
||||
fields: usize,
|
||||
) -> P<ast::Expr> {
|
||||
let let_values: Vec<P<ast::Stmt>> = (0 .. fields)
|
||||
let let_values: Vec<ast::Stmt> = (0 .. fields)
|
||||
.map(|i| {
|
||||
let name = builder.id(format!("__field{}", i));
|
||||
quote_stmt!(cx,
|
||||
@@ -431,7 +431,7 @@ fn deserialize_struct_as_seq(
|
||||
struct_path: ast::Path,
|
||||
fields: &[ast::StructField],
|
||||
) -> Result<P<ast::Expr>, Error> {
|
||||
let let_values: Vec<P<ast::Stmt>> = (0 .. fields.len())
|
||||
let let_values: Vec<_> = (0 .. fields.len())
|
||||
.map(|i| {
|
||||
let name = builder.id(format!("__field{}", i));
|
||||
quote_stmt!(cx,
|
||||
@@ -920,7 +920,7 @@ fn deserialize_struct_visitor(
|
||||
struct_path: ast::Path,
|
||||
fields: &[ast::StructField],
|
||||
container_attrs: &attr::ContainerAttrs,
|
||||
) -> Result<(Vec<P<ast::Item>>, P<ast::Stmt>, P<ast::Expr>), Error> {
|
||||
) -> Result<(Vec<P<ast::Item>>, ast::Stmt, P<ast::Expr>), Error> {
|
||||
let field_visitor = deserialize_field_visitor(
|
||||
cx,
|
||||
builder,
|
||||
@@ -977,7 +977,7 @@ fn deserialize_map(
|
||||
.collect();
|
||||
|
||||
// Declare each field.
|
||||
let let_values: Vec<P<ast::Stmt>> = field_names.iter()
|
||||
let let_values: Vec<ast::Stmt> = field_names.iter()
|
||||
.map(|field_name| quote_stmt!(cx, let mut $field_name = None;).unwrap())
|
||||
.collect();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user