Merge pull request #1543 from jplatte/alloc-de-compile-fix

Fix a compile error in derive(Deserialize) with no_std + alloc
This commit is contained in:
David Tolnay 2019-05-31 13:41:07 -07:00 committed by GitHub
commit 0a3eeab273
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@ pub use lib::result::Result::{self, Err, Ok};
pub use self::string::from_utf8_lossy;
#[cfg(any(feature = "alloc", feature = "std"))]
pub use lib::Vec;
pub use lib::{ToString, Vec};
mod string {
use lib::*;

View File

@ -2059,7 +2059,7 @@ fn deserialize_identifier(
) = if collect_other_fields {
(
Some(quote! {
let __value = _serde::private::de::Content::String(__value.to_string());
let __value = _serde::private::de::Content::String(_serde::export::ToString::to_string(__value));
}),
Some(quote! {
let __value = _serde::private::de::Content::Str(__value);