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 forced casts on Decoder #97

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

l-barbosa
Copy link

This pull request removes some forced unwrapping and forced casts on Decoder
In all cases, the method was returning an optional so this is simple removing the forced unwrapping/casting and returning nil.

There maybe perfectly valid reasons to want the crash to happen in certain circumstances so I completely understand if you decide not to integrate the changes.
In my uses cases, I find it much more preferable to return nil which allows me to catch any error thrown in my code and decide how to handle it.

This is a very useful library. Congrats to all involved in this effort.

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.

1 participant