From 2f1945eaf27e8cf045430054c2f0c0542dd71fc0 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Wed, 3 Apr 2019 09:16:17 -0700 Subject: [PATCH] Refer directly to serde_path in Deserialize impl This makes it not a breaking change if we later want to eliminate the `use #serde_path as _serde;` line. --- serde_derive/src/de.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/serde_derive/src/de.rs b/serde_derive/src/de.rs index 7243b53c..df76ec63 100644 --- a/serde_derive/src/de.rs +++ b/serde_derive/src/de.rs @@ -27,15 +27,16 @@ pub fn expand_derive_deserialize(input: &syn::DeriveInput) -> Result(__deserializer: __D) -> _serde::export::Result<#remote #ty_generics, __D::Error> + #vis fn deserialize<__D>(__deserializer: __D) -> #serde::export::Result<#remote #ty_generics, __D::Error> where - __D: _serde::Deserializer<#delife>, + __D: #serde::Deserializer<#delife>, { #used #body @@ -47,10 +48,10 @@ pub fn expand_derive_deserialize(input: &syn::DeriveInput) -> Result for #ident #ty_generics #where_clause { - fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result + impl #de_impl_generics #serde::Deserialize<#delife> for #ident #ty_generics #where_clause { + fn deserialize<__D>(__deserializer: __D) -> #serde::export::Result where - __D: _serde::Deserializer<#delife>, + __D: #serde::Deserializer<#delife>, { #body }