1
1
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:
Rob Rix 2015-09-16 15:46:45 -04:00
parent d0d53d152a
commit f9023f88b7

View File

@ -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)):