Skip to content

Conversation

@eerie444
Copy link
Contributor

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.

Erik Strottmann added 2 commits November 21, 2020 18:34
https://bugs.swift.org/browse/SR-2 was resolved in Swift 4.1. In order
to fix #345, we need to remove support for Swift 4.0.

We could add support for Swift 4.1, but I believe it’s better to
increase the minimum version directly to Swift 4.2 because BonMot
already officially supports and runs CI on Swift 4.2.
https://bugs.swift.org/browse/SR-2 was resolved in Swift 4.1. That
allows simplifying the switch statement in StringStyle.update(part:)
to remove nested switches, defaults, and fatal errors.

Fixes #345.
Copy link
Collaborator

@ZevEisenberg ZevEisenberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@eerie444
Copy link
Contributor Author

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

@chrisballinger chrisballinger merged commit 9335865 into Rightpoint:master Nov 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use Swift 4.1's ability to wrap directives around switch cases

3 participants