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

Make SafetyRating conform to Hashable #40

Merged
merged 1 commit into from
Dec 12, 2023
Merged

Conversation

andrewheard
Copy link
Collaborator

This allows collections of SafetyRatings to be displayed in SwiftUI views, such as List, which require the elements to conform to Hashable.

Note: When moved into the SDK, the auto-synthesized Hashable conformance can be used (SE-0185). This wasn't possible when conformance was implemented in the sample app (Extension outside of file declaring struct 'SafetyRating' prevents automatic synthesis of 'hash(into:)' for protocol 'Hashable').

@github-actions github-actions bot added component:swift sdk Issue/PR related to Swift SDK status:awaiting review PR awaiting review from a maintainer labels Dec 12, 2023
@peterfriese
Copy link
Collaborator

Thanks, @andrewheard!

@andrewheard andrewheard merged commit a86b3f0 into main Dec 12, 2023
8 checks passed
@andrewheard andrewheard deleted the ah/safety-rating-hashable branch December 12, 2023 22:02
@github-actions github-actions bot removed the status:awaiting review PR awaiting review from a maintainer label Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:swift sdk Issue/PR related to Swift SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants