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:
parent
66281a6674
commit
ddbe0943ef
@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user