Rightpoint / BonMot

Beautiful, easy attributed strings in Swift
MIT License
3.56k stars 196 forks source link

Simplify StringStyle.update(part:) switch statement #396

Closed u2606 closed 3 years ago

u2606 commented 3 years ago

Follow-up to #381 because GitHub won’t let me reopen it. Fixes #345.

Simplifies the switch statement in StringStyle.update(part:) using the improved interaction between switch and #if in Swift 4.1+. This requires removing Swift 4.0 from the supported versions. I think it’s better not to add new support for Swift 4.1, so that would make the minimum version Swift 4.2.

u2606 commented 3 years ago

Awesome, feel free to merge! I don’t have write access to this repo so I can’t.