Skip to content

Conversation

@ArtiomTr
Copy link
Contributor

@ArtiomTr ArtiomTr commented Nov 6, 2025

Check for fields length in tagged enum repr is incorrect - it validates original fields length, not filtered one. Because of that, such enum causes panic:

#[derive(Serialize, Type)]
#[serde(tag = "type")]
pub enum Sample {
    First(#[serde(skip)] String),
}

@oscartbeaumont oscartbeaumont merged commit 69fd165 into specta-rs:main Nov 24, 2025
4 checks passed
@oscartbeaumont
Copy link
Member

Great catch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants