Skip to content

fix(model): scan gateway metadata at top level - #2576

Open
BreezeDelegate wants to merge 1 commit into
twilight-rs:mainfrom
BreezeDelegate:fix/gateway-event-top-level-metadata
Open

fix(model): scan gateway metadata at top level#2576
BreezeDelegate wants to merge 1 commit into
twilight-rs:mainfrom
BreezeDelegate:fix/gateway-event-top-level-metadata

Conversation

@BreezeDelegate

@BreezeDelegate BreezeDelegate commented Aug 23, 2026

Copy link
Copy Markdown

Fixes #2567.

Track JSON nesting while scanning gateway metadata so nested op, s, and t fields cannot be mistaken for top-level metadata. The scanner also accepts JSON whitespace around the key separator while keeping the borrowed, allocation-free path.

Tests:

  • cargo test -p twilight-model --all-features
  • cargo clippy -p twilight-model --all-targets --all-features -- -D warnings
  • cargo fmt --all -- --check

@github-actions github-actions Bot added c-model Affects the model crate t-fix Fixes a bug in the library labels Aug 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c-model Affects the model crate t-fix Fixes a bug in the library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GatewayEventDeserializer::from_json is incorrect

1 participant