-
Notifications
You must be signed in to change notification settings - Fork 0
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
Make GlFns::load_from take FnMut instead of Fn #8
Comments
That said, can you demonstrate an actual use case of how this would allow code that isn't currently allowed. Because function lookups should be a read-only sort of affair. If a function lookup is, by itself, modifying program state, then that's a very bad sign. |
To be frank, I have no idea. However, do note that |
Well, I wrote the current version of that code actually. I think I was just matching an old version to avoid semver breaking because glow started with gl. However, I think gl is just being overbroad. It's not impossible to change this but i dont think I want to without good reason because these loaders should be fully deterministic. (And if you absolutely need to track calls for debugging or whatever you could still use refcell.) |
GlFns::load_from
currently takesFn
for the *GetProcAddress closure. AFAICT this unnecessarily restricts what the caller can do in their proc address closures, and it should takeFnMut
instead?The text was updated successfully, but these errors were encountered: