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

Categories can be of any Hashable type.

This commit is contained in:
Rob Rix 2015-10-14 08:59:19 -04:00
parent 59b7d60349
commit 58c0a7ff2c
2 changed files with 3 additions and 1 deletions

View File

@ -57,5 +57,7 @@ public func < (left: Category, right: Category) -> Bool {
/// A type whose values belong to a set of categories.
public protocol Categorizable {
typealias Category: Hashable
var categories: Set<Category> { get }
}

View File

@ -81,7 +81,7 @@ extension Fix where A: CustomJSONConvertible {
// MARK: - Categorizable
extension Fix where A: Categorizable {
public var categories: Set<Category> {
public var categories: Set<A.Category> {
switch self {
case let .In(.Leaf(a)):
return a.categories