Skip to content
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

Use FnOnce in API where applicable #50

Open
ids1024 opened this issue Jun 13, 2022 · 0 comments
Open

Use FnOnce in API where applicable #50

ids1024 opened this issue Jun 13, 2022 · 0 comments

Comments

@ids1024
Copy link

ids1024 commented Jun 13, 2022

Functions like https://docs.rs/libpulse-binding/2.26.0/libpulse_binding/context/introspect/struct.Introspector.html#method.get_server_info take FnMut. The function shouldn't be called more than once, right? Then FnOnce is more general and appropriate.

I guess this would apply to a lot of callbacks...

ids1024 added a commit to ids1024/pulse-binding-rust that referenced this issue Jun 23, 2022
This is more general than `FnMut`, which is useful in some cases.

jnqnfe#50
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

No branches or pull requests

1 participant