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

Remove unnecessary clone in websockets_chat.rs #860

Merged
merged 1 commit into from
Jun 1, 2021
Merged

Remove unnecessary clone in websockets_chat.rs #860

merged 1 commit into from
Jun 1, 2021

Conversation

ekzhang
Copy link
Contributor

@ekzhang ekzhang commented May 31, 2021

Hi, thanks for maintaining this great library. I think there is a line in the websockets_chat.rs library to clone an Arc<_> that isn't necessary, since the users variable is only passed around by a reference of type &Arc<_> anyway. I removed this cloned variable, and it still seems to compile and run fine.

Let me know if this makes sense.

Hi, thanks for maintaining this great library. I think there is a line in the `websockets_chat.rs` library to clone an `Arc<_>` that isn't necessary, since the `users` variable is only passed around by a reference of type `&Arc<_>` anyway. I removed this cloned variable, and it still seems to compile and run fine.

Let me know if this makes sense.
@jxs jxs merged commit 4673410 into seanmonstar:master Jun 1, 2021
@jxs
Copy link
Collaborator

jxs commented Jun 1, 2021

Hi, nice catch thanks! 🚀

@ekzhang ekzhang deleted the patch-1 branch June 1, 2021 21:02
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 this pull request may close these issues.

2 participants