From 1e2b02920b0fd1cfa0c86d53a89864db8f9d4d07 Mon Sep 17 00:00:00 2001 From: Bjerg Date: Thu, 12 May 2022 23:47:38 +0200 Subject: [PATCH] fix: make ast node ids optional (#1254) --- ethers-solc/src/artifacts/ast.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ethers-solc/src/artifacts/ast.rs b/ethers-solc/src/artifacts/ast.rs index 91f3a6aa..236c3bdb 100644 --- a/ethers-solc/src/artifacts/ast.rs +++ b/ethers-solc/src/artifacts/ast.rs @@ -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, /// The node type. #[serde(rename = "nodeType")]