@@ -13,17 +13,17 @@ public protocol EventType: Hashable {}
1313/// `EventType` wrapper for handling `.Any` event.
1414public enum Event < E: EventType >
1515{
16- case Some ( E )
17- case Any
16+ case some ( E )
17+ case any
1818}
1919
2020extension Event : Hashable
2121{
2222 public var hashValue : Int
2323 {
2424 switch self {
25- case . Some ( let x) : return x. hashValue
26- case . Any : return _hashValueForAny
25+ case . some ( let x) : return x. hashValue
26+ case . any : return _hashValueForAny
2727 }
2828 }
2929}
@@ -33,17 +33,17 @@ extension Event: RawRepresentable
3333 public init ( rawValue: E ? )
3434 {
3535 if let rawValue = rawValue {
36- self = . Some ( rawValue)
36+ self = . some ( rawValue)
3737 }
3838 else {
39- self = . Any
39+ self = . any
4040 }
4141 }
4242
4343 public var rawValue : E ?
4444 {
4545 switch self {
46- case . Some ( let x) : return x
46+ case . some ( let x) : return x
4747 default : return nil
4848 }
4949 }
@@ -52,9 +52,9 @@ extension Event: RawRepresentable
5252public func == < E: EventType > ( lhs: Event < E > , rhs: Event < E > ) -> Bool
5353{
5454 switch ( lhs, rhs) {
55- case let ( . Some ( x1) , . Some ( x2) ) where x1 == x2:
55+ case let ( . some ( x1) , . some ( x2) ) where x1 == x2:
5656 return true
57- case ( . Any , . Any ) :
57+ case ( . any , . any ) :
5858 return true
5959 default :
6060 return false
@@ -64,19 +64,19 @@ public func == <E: EventType>(lhs: Event<E>, rhs: Event<E>) -> Bool
6464public func == < E: EventType > ( lhs: Event < E > , rhs: E ) -> Bool
6565{
6666 switch lhs {
67- case . Some ( let x) :
67+ case . some ( let x) :
6868 return x == rhs
69- case . Any :
69+ case . any :
7070 return false
7171 }
7272}
7373
7474public func == < E: EventType > ( lhs: E , rhs: Event < E > ) -> Bool
7575{
7676 switch rhs {
77- case . Some ( let x) :
77+ case . some ( let x) :
7878 return x == lhs
79- case . Any :
79+ case . any :
8080 return false
8181 }
8282}
0 commit comments