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

Would it be possible to relax RingSender::send's &mut self to &self? #131

Closed
jesdazrez opened this issue Oct 9, 2023 · 3 comments · Fixed by #132
Closed

Would it be possible to relax RingSender::send's &mut self to &self? #131

jesdazrez opened this issue Oct 9, 2023 · 3 comments · Fixed by #132

Comments

@jesdazrez
Copy link

jesdazrez commented Oct 9, 2023

Hi there!, first of all thanks for the cool library :)
I was taking a quick look at the src of the send function and wondered if the mutable self reference is actually needed?

For additional context, I'm trying to use the RingSender in a closure that must implement Fn.

@brunocodutra
Copy link
Owner

Good question, I can't think of a reason why it couldn't take &self.

@brunocodutra
Copy link
Owner

@jesdazrez I've just released this change on v0.12.

@jesdazrez
Copy link
Author

thanks a lot @brunocodutra!

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

Successfully merging a pull request may close this issue.

2 participants