Skip to content

Commit

Permalink
Add equatable conformance when value is equatable (#1565)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxgoedjen authored Oct 25, 2022
1 parent 658ecbb commit 7e7ae4a
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -395,3 +395,9 @@ public struct UncheckedSendable<Value>: @unchecked Sendable {
_modify { yield &self.value[keyPath: keyPath] }
}
}

extension UncheckedSendable: Equatable where Value: Equatable {
public static func == (lhs: UncheckedSendable, rhs: UncheckedSendable) -> Bool {
lhs.value == rhs.value
}
}

0 comments on commit 7e7ae4a

Please sign in to comment.