Skip to content

Commit

Permalink
Made _XMLElement conform to Equatable
Browse files Browse the repository at this point in the history
  • Loading branch information
regexident committed Dec 21, 2018
1 parent d2aeeed commit 79b2e8f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Sources/XMLCoder/Auxiliaries/XMLElement.swift
Original file line number Diff line number Diff line change
Expand Up @@ -209,3 +209,17 @@ internal class _XMLElement {
return string
}
}

extension _XMLElement: Equatable {
static func == (lhs: _XMLElement, rhs: _XMLElement) -> Bool {
guard
lhs.key == rhs.key,
lhs.value == rhs.value,
lhs.attributes == rhs.attributes,
lhs.children == rhs.children
else {
return false
}
return true
}
}

0 comments on commit 79b2e8f

Please sign in to comment.