From d8ff87ad4b1a316301bc6b5bbada301104021525 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 11 Apr 2023 19:42:13 -0500 Subject: [PATCH 1/2] fix(snapbox): Only track json when its enabled --- crates/snapbox/src/data.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/snapbox/src/data.rs b/crates/snapbox/src/data.rs index aa5f9b1e..ab4432c1 100644 --- a/crates/snapbox/src/data.rs +++ b/crates/snapbox/src/data.rs @@ -10,7 +10,7 @@ pub struct Data { enum DataInner { Binary(Vec), Text(String), - #[cfg(feature = "structured-data")] + #[cfg(feature = "json")] Json(serde_json::Value), } From f65fb13055be26899a934939999c618d13b86851 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 11 Apr 2023 19:44:06 -0500 Subject: [PATCH 2/2] fix(snapbox): Be explicit that json needs json --- crates/snapbox/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/snapbox/Cargo.toml b/crates/snapbox/Cargo.toml index 043f5821..65fedd3f 100644 --- a/crates/snapbox/Cargo.toml +++ b/crates/snapbox/Cargo.toml @@ -44,7 +44,7 @@ cmd = ["dep:os_pipe", "dep:wait-timeout", "dep:libc", "dep:windows-sys"] examples = ["dep:escargot"] ## Snapshotting of json -json = ["structured-data"] +json = ["structured-data", "dep:serde_json"] ## Snapshotting of structured data structured-data = ["dep:serde_json"]