Skip to content

MaxSize for postcard::Error#245

Open
cramt wants to merge 1 commit intojamesmunns:mainfrom
cramt:max_size_for_error
Open

MaxSize for postcard::Error#245
cramt wants to merge 1 commit intojamesmunns:mainfrom
cramt:max_size_for_error

Conversation

@cramt
Copy link

@cramt cramt commented Jun 20, 2025

fixes #224

@netlify
Copy link

netlify bot commented Jun 20, 2025

Deploy Preview for cute-starship-2d9c9b canceled.

Name Link
🔨 Latest commit 6715f9b
🔍 Latest deploy log https://app.netlify.com/projects/cute-starship-2d9c9b/deploys/6855999b6ab1710008d80b2a

Copy link
Owner

@jamesmunns jamesmunns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is correct currently, but if we ever add an error variant that isn't just a discriminant, this could be subtly wrong. Also, varint_max is mostly intended for integers directly.

Would it be possible to use the postcard-derive MaxSize derive for this instead?

@cramt
Copy link
Author

cramt commented Jun 25, 2025

I think this is correct currently, but if we ever add an error variant that isn't just a discriminant, this could be subtly wrong. Also, varint_max is mostly intended for integers directly.

Would it be possible to use the postcard-derive MaxSize derive for this instead?

it would be but postcard-derive is currently only an optional experimental dependency of the postcard crate, so maybe we stick to a manual definition until thats not experimental anymore?

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.

Implement MaxSize for postcard::Error

2 participants