CodableFirebase
CodableFirebase copied to clipboard
Removed forced casts on Decoder
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.