1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 00:12:29 +03:00

Return the identity diff when equal.

This commit is contained in:
Rob Rix 2015-10-14 12:29:40 -04:00
parent 517c87c303
commit b8f8953f1c

View File

@ -57,7 +57,7 @@ private let c = Term.Leaf("c")
private let d = Term.Leaf("d")
private func SES(a: [Term], _ b: [Term]) -> [Diff] {
return SES(a, b, recur: const(nil))
return SES(a, b) { $0 == $1 ? Diff($1) : nil }
}
private func == (a: [Diff], b: [Diff]) -> Bool {