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

Derive Hash for Location struct #279

Merged
merged 1 commit into from
Mar 18, 2024
Merged

Conversation

WillLillis
Copy link
Contributor

First of all thanks so much for this project!

As part of some work in asm-lsp, I found it would be helpful if the Hash trait was derived on the Location struct, which I've done in this PR.

I looked through some of the other types defined in this project and saw that some could have Hash derived, but others could not as they contain a field of type serde_json::Value, which does not implement Hash. Is there any downside to deriving this trait when possible? I'd be happy to go through and add Hash derives as allowed on all structs in the crate if that would be helpful :)

@Marwes
Copy link
Member

Marwes commented Mar 18, 2024

Only real downside is if the type later gets a field added which doesn't allow Hash, in which case the derive would have to be removed. For these three it seems reasonable to add them though.

@Marwes Marwes merged commit 2415d52 into gluon-lang:master Mar 18, 2024
4 checks passed
@WillLillis
Copy link
Contributor Author

Makes sense, thank you!

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