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

Fixed up clippy warnrings/errors #296

Merged
merged 1 commit into from
Nov 21, 2022
Merged

Conversation

gybrish
Copy link
Contributor

@gybrish gybrish commented Nov 19, 2022

Fixing up clippy warnings/errors before working on #287

For reference:
PartialEq, Eq: https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq
Derived Hash with impl PartialEq: https://rust-lang.github.io/rust-clippy/master/index.html#derive_hash_xor_eq

@gregtatum gregtatum self-requested a review November 21, 2022 16:21
Copy link
Member

@gregtatum gregtatum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks good to me. Thanks for the contribution!

@@ -120,6 +120,12 @@ impl PartialEq for ResourceId {
}
}

impl std::hash::Hash for ResourceId {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thought (no action needed): Ah, I'm trying to reason through this, but it seems like we may have some correctness issues around handling multiple resources that have different optional values. Previously the behavior looks like you could add multiple ResourceId values with differing ResourceTypes, but now it will only have one. I'm not sure what the correct resolution is here, or if anything needs to happen. Maybe I should add some tests around this area.

This seems like a low-probability edge case, but should probably be reasoned through.

@gregtatum gregtatum merged commit 9f801be into projectfluent:main Nov 21, 2022
@gybrish gybrish deleted the clippy_fix branch November 22, 2022 12:31
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