Skip to content

Make element_sizes return Result, default to Err#80

Merged
frankmcsherry merged 1 commit intomasterfrom
element_sizes_validation
Mar 14, 2026
Merged

Make element_sizes return Result, default to Err#80
frankmcsherry merged 1 commit intomasterfrom
element_sizes_validation

Conversation

@frankmcsherry
Copy link
Copy Markdown
Owner

The default element_sizes now returns Err("unimplemented") instead of silently accepting any byte length. This ensures that validate rejects data for types that haven't implemented element_sizes, rather than passing validation and producing garbage from from_store.

Types that override element_sizes push their sizes and return Ok(()). The derive macro already generates this automatically.

The default element_sizes now returns Err("unimplemented") instead of
silently accepting any byte length. This ensures that validate rejects
data for types that haven't implemented element_sizes, rather than
passing validation and producing garbage from from_store.

Types that override element_sizes push their sizes and return Ok(()).
The derive macro already generates this automatically.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@frankmcsherry frankmcsherry merged commit 8602539 into master Mar 14, 2026
6 checks passed
@github-actions github-actions bot mentioned this pull request Mar 14, 2026
@frankmcsherry frankmcsherry deleted the element_sizes_validation branch March 14, 2026 22:57
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.

1 participant