mirror of
https://github.com/github/semantic.git
synced 2024-12-26 00:12:29 +03:00
Info is AlgebraicHashable.
This commit is contained in:
parent
cb5b7c0b33
commit
1635b8ab8a
@ -1,4 +1,4 @@
|
||||
public enum Info: Equatable {
|
||||
public enum Info: AlgebraicHashable {
|
||||
case Literal(String, Set<Category>)
|
||||
|
||||
public var categories: Set<Category> {
|
||||
@ -7,6 +7,13 @@ public enum Info: Equatable {
|
||||
return c
|
||||
}
|
||||
}
|
||||
|
||||
public var hash: Hash {
|
||||
switch self {
|
||||
case let .Literal(source, categories):
|
||||
return Hash("Literal", Hash(source), Hash(categories))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user