Skip to content

Commit e4e110e

Browse files
committed
Fix a compile error in derive(Deserialize) with no_std + alloc
1 parent 0726623 commit e4e110e

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎serde/src/export.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pub use lib::result::Result::{self, Err, Ok};
99
pub use self::string::from_utf8_lossy;
1010

1111
#[cfg(any(feature = "alloc", feature = "std"))]
12-
pub use lib::Vec;
12+
pub use lib::{ToString, Vec};
1313

1414
mod string {
1515
use lib::*;

‎serde_derive/src/de.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2059,7 +2059,7 @@ fn deserialize_identifier(
20592059
) = if collect_other_fields {
20602060
(
20612061
Some(quote! {
2062-
let __value = _serde::private::de::Content::String(__value.to_string());
2062+
let __value = _serde::private::de::Content::String(_serde::export::ToString::to_string(__value));
20632063
}),
20642064
Some(quote! {
20652065
let __value = _serde::private::de::Content::Str(__value);

0 commit comments

Comments
 (0)