Skip to content

Commit f7f5877

Browse files
committed
fix: skip span and other developer-mode properties in symbolic expressions struct
1 parent 6eb4a23 commit f7f5877

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

clarity/src/vm/contexts.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ pub struct ContractContext {
229229
// @todo: @hugocaillard: remove pub
230230
// it's only used to know that the contract can be called with wasm
231231
// it should be epoch gated in the future
232+
#[serde(skip)]
232233
pub wasm_module: Option<Vec<u8>>,
233234
}
234235

clarity/src/vm/representations.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,13 +455,17 @@ pub struct SymbolicExpression {
455455
pub id: u64,
456456

457457
#[cfg(feature = "developer-mode")]
458+
#[serde(skip)]
458459
pub span: Span,
459460

460461
#[cfg(feature = "developer-mode")]
462+
#[serde(skip)]
461463
pub pre_comments: Vec<(String, Span)>,
462464
#[cfg(feature = "developer-mode")]
465+
#[serde(skip)]
463466
pub end_line_comment: Option<String>,
464467
#[cfg(feature = "developer-mode")]
468+
#[serde(skip)]
465469
pub post_comments: Vec<(String, Span)>,
466470
}
467471

@@ -651,7 +655,7 @@ impl fmt::Display for SymbolicExpression {
651655
}
652656
}
653657

654-
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
658+
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
655659
pub struct Span {
656660
pub start_line: u32,
657661
pub start_column: u32,

0 commit comments

Comments
 (0)