-
Notifications
You must be signed in to change notification settings - Fork 47
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
Rust: Limit preallocation during byte (opaque, string) reads to 1kb #178
Conversation
#[cfg(feature = "std")] | ||
const MAX_PREALLOCATED_BYTES_READ: usize = 1024; // 1KB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to make this configurable. But would rather set it to a sensible limit at this point and revisit that when it matters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor nit otherwise looks great
Alternative implementation that I believe solves the same problem is proposed in #179. |
Closing in favor of #179. |
What
In the Rust generated code limit preallocation during byte (opaque, string) reads to 1kb.
Why
Close #174