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

Differentiable requres Equatable AND Hashable, but docs say otherwise #152

Open
2 tasks done
peterkos opened this issue Dec 8, 2022 · 0 comments
Open
2 tasks done

Comments

@peterkos
Copy link

peterkos commented Dec 8, 2022

Checklist

Expected Behavior

The docs (README) specifies that:

There are default implementations of Differentiable for the types that conforming to Equatable [or] Hashable

Current Behavior

Differentiable is defined as such:

public typealias Differentiable = ContentIdentifiable & ContentEquatable

Detailed Description (Include Screenshots)

This discrepancy cost me a few days of refactoring, due to having many nested types that aren't all Equatable or Hashable. I conformed them to Equatable, and theoretically they should be Differentiable, but they don't seem to be. Any advice or workarounds appreciated here, but, this seems like a difference between the docs + code.

Environment

  • Library version: 1.1.5

  • Swift version: 5.7

  • iOS version: 16.0

  • Xcode version: 14.0

  • Devices/Simulators: Sim

  • CocoaPods/Carthage version: 1.11.3

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

No branches or pull requests

1 participant