diff --git a/Cargo.toml b/Cargo.toml index b6067c1..d20106f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,12 +17,13 @@ default = ["std"] std = ["rand"] [dependencies] -serde = { version = "1.0", features = ["derive"], optional = true } +serde = { version = "1.0", optional = true } rand = { version = "0.8", optional = true } uuid = { version = "1.1", optional = true } [dev-dependencies] bencher = "0.1" +serde_derive = "1.0" [[bench]] name = "bench" diff --git a/src/serde.rs b/src/serde.rs index 829a6bf..f6b221f 100644 --- a/src/serde.rs +++ b/src/serde.rs @@ -41,7 +41,7 @@ impl<'de> Deserialize<'de> for Ulid { /// ``` /// # use ulid::Ulid; /// # use ulid::serde::ulid_as_u128; -/// # use serde::{Serialize, Deserialize}; +/// # use serde_derive::{Serialize, Deserialize}; /// #[derive(Serialize, Deserialize)] /// struct U128Example { /// #[serde(with = "ulid_as_u128")] @@ -81,7 +81,7 @@ pub mod ulid_as_u128 { /// ``` /// # use ulid::Ulid; /// # use ulid::serde::ulid_as_uuid; -/// # use serde::{Serialize, Deserialize}; +/// # use serde_derive::{Serialize, Deserialize}; /// #[derive(Serialize, Deserialize)] /// struct UuidExample { /// #[serde(with = "ulid_as_uuid")]