Skip to content

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

@peterkos

Description

@peterkos

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions