Make tree serde-serializable

This commit is contained in:
Rahix 2025-05-30 21:48:07 +02:00
parent 92e8ea066f
commit 1f889245af
3 changed files with 4 additions and 1 deletions

View file

@ -964,6 +964,7 @@ dependencies = [
"hashbrown",
"indexmap",
"serde",
"serde_derive",
]
[[package]]

View file

@ -13,7 +13,7 @@ chrono = "0.4.41"
env_logger = { version = "0.11.8", default-features = false, features = ["auto-color", "color", "humantime"] }
forgejo-api = { git = "https://git.fa-fo.de/rahix/forgejo-api.git", rev = "a3f6452cfe774898a89ac66be393e5205f5e12b7" }
log = "0.4.27"
petgraph = "0.8.1"
petgraph = { version = "0.8.1", features = ["serde-1"] }
serde = { version = "1.0.219", features = ["derive"] }
serde_json = "1.0.140"
sha256 = "1.6.0"

View file

@ -113,8 +113,10 @@ impl std::fmt::Display for ElementStatus {
pub type ElementIndex = petgraph::graph::NodeIndex;
#[derive(serde::Serialize)]
pub struct Tree {
graph: petgraph::Graph<Element, ()>,
#[serde(skip)]
issue_map: BTreeMap<u64, ElementIndex>,
}