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

Protocol 'WebSocket' as a type cannot conform to 'Equatable' #123

Open
mourgias opened this issue Feb 23, 2022 · 1 comment
Open

Protocol 'WebSocket' as a type cannot conform to 'Equatable' #123

mourgias opened this issue Feb 23, 2022 · 1 comment

Comments

@mourgias
Copy link

No description provided.

@yvbeek
Copy link
Member

yvbeek commented Aug 13, 2022

You are likely trying to put a WebSocket in a Dictionary. Unfortunately that isn't possible and that will result in the compiler error that you mentioned in the title. At some point I might refactor WebSocket to make that easier, but until then I recommend wrapping the WebSocket in a struct or class. You can give that object a unique identifier and make it support Equatable / Hashable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants