Skip to content

Commit c66eabb

Browse files
committed
fix: use internally tagged serde repr for TypeSpecificInfo
this means we would generate `{kind: "<tag>", <other-fields>..}` which is easier for me to produce from ruby i think? https://serde.rs/enum-representations.html#internally-tagged
1 parent b5dd78b commit c66eabb

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "trace_types"
3-
version = "0.4.0"
3+
version = "0.4.1"
44
edition = "2021"
55

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ pub struct FieldTypeRecord {
173173
}
174174

175175
#[derive(Debug, Clone, Serialize, Deserialize)]
176+
#[serde(tag = "kind")]
176177
pub enum TypeSpecificInfo {
177178
None,
178179
Struct { fields: Vec<FieldTypeRecord> },

0 commit comments

Comments
 (0)