Hi,
What is the best way to do a one line check for an enum with a specific inner value? Example:
enum State {
case Running, Stopped(Int32)
}
func stoppedSuccessfully(state: State) -> Bool {
return state == .Stopped(0) // So only return true if state is .Stopped and the inner value is 0
}
Thank You,
Chris