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:
parent
59b7d60349
commit
58c0a7ff2c
@ -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 }
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user