Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--lib/smol_str/Cargo.toml5
-rw-r--r--lib/smol_str/src/serde.rs1
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/smol_str/Cargo.toml b/lib/smol_str/Cargo.toml
index e89e0e8e02..d938e40ac2 100644
--- a/lib/smol_str/Cargo.toml
+++ b/lib/smol_str/Cargo.toml
@@ -12,7 +12,7 @@ rustdoc-args = ["--cfg", "docsrs"]
all-features = true
[dependencies]
-serde = { version = "1.0", optional = true, default-features = false }
+serde_core = { version = "1.0.220", optional = true, default-features = false }
borsh = { version = "1.4.0", optional = true, default-features = false }
arbitrary = { version = "1.3", optional = true }
@@ -23,4 +23,5 @@ serde = { version = "1.0", features = ["derive"] }
[features]
default = ["std"]
-std = ["serde?/std", "borsh?/std"]
+std = ["serde_core?/std", "borsh?/std"]
+serde = ["dep:serde_core"]
diff --git a/lib/smol_str/src/serde.rs b/lib/smol_str/src/serde.rs
index 05b8fecacc..4f08b444c5 100644
--- a/lib/smol_str/src/serde.rs
+++ b/lib/smol_str/src/serde.rs
@@ -2,6 +2,7 @@ use alloc::{string::String, vec::Vec};
use core::fmt;
use serde::de::{Deserializer, Error, Unexpected, Visitor};
+use serde_core as serde;
use crate::SmolStr;