CodableFirebase icon indicating copy to clipboard operation
CodableFirebase copied to clipboard

Removed forced casts on Decoder

Open l-barbosa opened this issue 4 years ago • 0 comments

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.

l-barbosa avatar Aug 12 '20 16:08 l-barbosa