-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add API to use stack-allocated buffers safely. #11
Comments
Be aware that in your second example, nothing prevents the user from dropping We could somewhat mitigate that by checking the EDIT: I guess something similar could be done in the first case, inside of the closure. |
I don't think that is true. In the first case you can't |
I think you misunderstand what I'm trying to say; I'm not talking about forgetting |
You are right, I misunderstood. If you |
Currently using stack-allocated buffers is impossible without unsafe. Here are two ideas on how to do this, coming from our conversations in Matrix :)
I'm not sure which one is best, we should explore tradeoffs and decide (or have both?)
Method 1: closure-based
Method 2: flag-based
The text was updated successfully, but these errors were encountered: