Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed implicit and forced unwrapping #42

Merged
merged 2 commits into from Jul 5, 2020

Conversation

chrismcs
Copy link

This project does a lot of implicit and forced unwrapping of vars. That's generally discouraged in Swift since you lose the protection of explicitly handling optionality.

Also - several vars were declared as weak and were also being force-unwrapped. This semantically doesn't make sense because weak vars, by definition, aren't retained and therefore must be optional. Swift should have probably always thrown an error on this - but as of Swift 5.3 in Xcode 12 Beta, force-unwrapping a weak var will no longer compile (it crashes the compiler). This PR fixes that.

@pascalbros
Copy link
Owner

Hey Chris, that’s great, thanks for your support.
I kinda abandoned this project, maybe it’s time to putting my ass back to my desk and update it.
Cheers, Pascal

@pascalbros pascalbros merged commit 7575c81 into pascalbros:master Jul 5, 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.

None yet

2 participants