Skip to content

support stringify to a fixed buffer stream #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 25, 2025

Conversation

kj4tmp
Copy link
Contributor

@kj4tmp kj4tmp commented Mar 24, 2025

Intended to close #26

This is only a minimal fix. A more extensive refactor may be best to support arbitrary error sets in writers.

@kj4tmp
Copy link
Contributor Author

kj4tmp commented Mar 24, 2025

Looks like my fmt on save moved an import. Hope thats ok!

@kj4tmp kj4tmp force-pushed the stringify-to-fbs branch from 7139000 to 2c9c45a Compare March 24, 2025 04:58
Copy link
Owner

@r4gus r4gus left a comment

Choose a reason for hiding this comment

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

Thanks for this PR!

Please change the return type of stringify() to (StringifyError || @TypeOf(out).Error)!void, i.e. we're merging the error-set of the provided writer with our own errors.

@r4gus r4gus added the enhancement New feature or request label Mar 24, 2025
@kj4tmp kj4tmp requested a review from r4gus March 25, 2025 04:46
Copy link
Owner

@r4gus r4gus left a comment

Choose a reason for hiding this comment

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

LGTM

@r4gus r4gus merged commit 4d293d6 into r4gus:master Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support writing to a fixed buffer stream
2 participants