Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

fix: make ast node ids optional #1254

Merged
merged 1 commit into from
May 12, 2022
Merged
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
3 changes: 2 additions & 1 deletion ethers-solc/src/artifacts/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ pub struct Ast {
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct Node {
/// The node ID.
pub id: usize,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub id: Option<usize>,

/// The node type.
#[serde(rename = "nodeType")]
Expand Down