mirror of
https://github.com/github/semantic.git
synced 2024-12-25 07:55:12 +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 {
|
public func == (left: Diff, right: Diff) -> Bool {
|
||||||
switch (left, right) {
|
switch (left, right) {
|
||||||
|
case (.Empty, .Empty):
|
||||||
|
return true
|
||||||
case let (.Patch(a1, b1), .Patch(a2, b2)):
|
case let (.Patch(a1, b1), .Patch(a2, b2)):
|
||||||
return a1 == a2 && b1 == b2
|
return a1 == a2 && b1 == b2
|
||||||
case let (.Copy(a), .Copy(b)):
|
case let (.Copy(a), .Copy(b)):
|
||||||
|
Loading…
Reference in New Issue
Block a user