Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eliminate dependency on serde's "derive" feature #694

Merged
merged 1 commit into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions serde_with/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,8 @@ hex = {version = "0.4.3", optional = true, default-features = false}
indexmap_1 = {package = "indexmap", version = "1.8", optional = true, default-features = false, features = ["serde-1"]}
indexmap_2 = {package = "indexmap", version = "2.0", optional = true, default-features = false, features = ["serde"]}
schemars_0_8 = {package = "schemars", version = "0.8.16", optional = true, default-features = false}
# The derive feature is needed for the flattened_maybe macro.
# https://github.com/jonasbb/serde_with/blob/eb1965a74a3be073ecd13ec05f02a01bc1c44309/serde_with/src/flatten_maybe.rs#L67
serde = {version = "1.0.152", default-features = false, features = ["derive"] }
serde = {version = "1.0.152", default-features = false}
serde_derive = "1.0.152"
serde_json = {version = "1.0.45", optional = true, default-features = false}
serde_with_macros = {path = "../serde_with_macros", version = "=3.6.0", optional = true}
time_0_3 = {package = "time", version = "~0.3.11", optional = true, default-features = false}
Expand All @@ -149,6 +148,7 @@ rmp-serde = "1.1.0"
ron = "0.8"
rustversion = "1.0.0"
schemars_0_8 = {package = "schemars", version = "0.8.16"}
serde = {version = "1.0.152", default-features = false, features = ["derive"]}
serde_json = {version = "1.0.25", features = ["preserve_order"]}
serde_test = "1.0.124"
serde_yaml = "0.9.2"
Expand Down
2 changes: 1 addition & 1 deletion serde_with/src/flatten_maybe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ macro_rules! flattened_maybe {
serde,
};

#[derive($crate::serde::Deserialize)]
#[derive($crate::serde_derive::Deserialize)]
#[serde(crate = "serde")]
pub struct Both<T> {
#[serde(flatten)]
Expand Down
2 changes: 2 additions & 0 deletions serde_with/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@ extern crate alloc;
pub extern crate core;
#[doc(hidden)]
pub extern crate serde;
#[doc(hidden)]
pub extern crate serde_derive;
#[cfg(feature = "std")]
extern crate std;

Expand Down
Loading