Skip to content

Commit

Permalink
skip ser if opt is none
Browse files Browse the repository at this point in the history
  • Loading branch information
Evanfeenstra committed Dec 10, 2024
1 parent 22cfbaa commit b63dc28
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/bin/cln/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ fn make_stack() -> Stack {
custom_2b_domain: None,
global_mem_limit: None,
backup_services: None,
lightning_peers: None,
auto_restart: None,
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ pub struct Stack {
pub custom_2b_domain: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub global_mem_limit: Option<u64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub backup_services: Option<Vec<String>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub lightning_peers: Option<Vec<LightningPeer>>,
}

Expand Down

0 comments on commit b63dc28

Please sign in to comment.