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

Location is Equatable.

This commit is contained in:
Rob Rix 2015-09-30 15:46:21 -04:00
parent 66281a6674
commit ddbe0943ef

View File

@ -1,4 +1,11 @@
public enum Location { public enum Location: Equatable {
/// A literal string, vs. range information. /// A literal string, vs. range information.
case Literal(String) case Literal(String)
} }
public func == (left: Location, right: Location) -> Bool {
switch (left, right) {
case let (.Literal(s1), .Literal(s2)):
return s1 == s2
}
}