Skip to content

fix(storage): update debug assertions in gen_array_impl and gen_struct_array_impl#3860

Merged
0xrusowsky merged 1 commit intomainfrom
fix/array-debug-assert-layout-ctx
May 7, 2026
Merged

fix(storage): update debug assertions in gen_array_impl and gen_struct_array_impl#3860
0xrusowsky merged 1 commit intomainfrom
fix/array-debug-assert-layout-ctx

Conversation

@decofe
Copy link
Copy Markdown
Member

@decofe decofe commented May 7, 2026

Follow-up to #3840 — the five debug_assert_eq!(ctx, LayoutCtx::FULL) checks in gen_array_impl and gen_struct_array_impl (storable_primitives.rs) were not updated when the LayoutCtx::INIT sentinel was introduced.

This switches them to debug_assert!(ctx.is_full()) so passing INIT no longer trips the assertion in debug builds.

  • 3 assertions in gen_array_impl (handle / load / store)
  • 2 assertions in gen_struct_array_impl (load / store)

All 89 storage tests pass.

…t_array_impl

Follow-up to #3840 — align the remaining debug_assert_eq!(ctx, FULL)
checks in gen_array_impl and gen_struct_array_impl with the new
LayoutCtx::INIT sentinel by switching to debug_assert!(ctx.is_full()).

Amp-Thread-ID: https://ampcode.com/threads/T-019e03a5-11cc-719c-8ca9-539a6b4b8277
@decofe decofe requested review from 0xrusowsky and mattsse as code owners May 7, 2026 18:55
@0xrusowsky 0xrusowsky added this pull request to the merge queue May 7, 2026
Merged via the queue into main with commit 79aaac5 May 7, 2026
33 checks passed
@0xrusowsky 0xrusowsky deleted the fix/array-debug-assert-layout-ctx branch May 7, 2026 19:31
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