mirror of
https://github.com/github/semantic.git
synced 2024-12-24 23:42:31 +03:00
Equality of empty diffs.
This commit is contained in:
parent
d0d53d152a
commit
f9023f88b7
@ -31,6 +31,8 @@ public func == <F: Equatable> (left: Syntax<F>, right: Syntax<F>) -> Bool {
|
||||
|
||||
public func == (left: Diff, right: Diff) -> Bool {
|
||||
switch (left, right) {
|
||||
case (.Empty, .Empty):
|
||||
return true
|
||||
case let (.Patch(a1, b1), .Patch(a2, b2)):
|
||||
return a1 == a2 && b1 == b2
|
||||
case let (.Copy(a), .Copy(b)):
|
||||
|
Loading…
Reference in New Issue
Block a user