Skip to content
This repository was archived by the owner on Sep 9, 2025. It is now read-only.

Commit 4dabbe5

Browse files
author
Hendrik van Antwerpen
committed
Fix compilation problem with only serde feature enabled
1 parent e5b2c17 commit 4dabbe5

File tree

2 files changed

+8
-16
lines changed

2 files changed

+8
-16
lines changed

stack-graphs/src/serde/mod.rs

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,5 @@
88
mod filter;
99
mod graph;
1010

11-
pub use filter::Filter;
12-
pub(crate) use filter::ImplicationFilter;
13-
pub use filter::NoFilter;
14-
pub use graph::DebugEntry;
15-
pub use graph::DebugInfo;
16-
pub use graph::Edge;
17-
pub use graph::Edges;
18-
pub use graph::Error;
19-
pub use graph::Files;
20-
pub use graph::Node;
21-
pub use graph::NodeID;
22-
pub use graph::Nodes;
23-
pub use graph::SourceInfo;
24-
pub use graph::StackGraph;
11+
pub use filter::*;
12+
pub use graph::*;

stack-graphs/tests/it/serde.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@
55
// Please see the LICENSE-APACHE or LICENSE-MIT files in this distribution for license details.
66
// ------------------------------------------------------------------------------------------------
77

8+
#[cfg(feature = "json")]
89
use stack_graphs::graph;
10+
#[cfg(feature = "json")]
911
use stack_graphs::serde;
1012

11-
#[cfg_attr(feature = "json", test)]
13+
#[cfg(feature = "json")]
14+
#[test]
1215
fn serde_json_stack_graph() {
1316
let expected = serde::StackGraph {
1417
files: serde::Files {
@@ -128,7 +131,8 @@ fn serde_json_stack_graph() {
128131
assert_eq!(observed, expected);
129132
}
130133

131-
#[cfg_attr(feature = "json", test)]
134+
#[cfg(feature = "json")]
135+
#[test]
132136
fn reconstruct() {
133137
let json_data = serde_json::json!(
134138
{

0 commit comments

Comments
 (0)