mirror of
https://github.com/github/semantic.git
synced 2024-12-01 17:59:10 +03:00
Parameterized Patch equality.
This commit is contained in:
parent
9a19d477df
commit
ca6392e636
@ -9,3 +9,13 @@ public enum Patch<A> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// MARK: - Equality
|
||||
|
||||
extension Patch {
|
||||
public static func equals(param: (A, A) -> Bool)(_ left: Patch, _ right: Patch) -> Bool {
|
||||
return Optional.equals(Fix.equals(param))(left.state.before, right.state.before)
|
||||
&& Optional.equals(Fix.equals(param))(left.state.after, right.state.after)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user