Bouke / HAP

Swift implementation of the Homekit Accessory Protocol
https://boukehaarsma.nl/HAP/
MIT License
364 stars 50 forks source link

Structure channel handler additions in a more readable way #121

Closed lorenzofiamingo closed 3 years ago

Bouke commented 3 years ago

What qualifies readable depends on the individual I guess. Your suggested code has less nesting, which is good. However due to varying uses of addHandlers, flatMap and nested addHandlers, I'm not sure the resulting pipeline is the same. The correctness isn't communicated by the code. I'm therefore inclined to close this PR.