Open TomasLinhart opened 3 years ago
Hi Tomas!
That's definitely a must-have parser improvement. I'd like to use logger during parsing and provide different methods in SVGParser
:
I'd be happy to accept such a pull request. There are probably a lot of work, so it makes sense to split it to different PRs. Also we need to keep backward compatibility, so existing API should work as before (except logging to console, this should be avoided no doubt).
Currently, there are a lot of force-unwraps of optionals in the codebase. For example, SVGParser contains a few unchecked force-unwraps that can result in a crash for non-ideal SVGs. We had a chance to experience these crashes.
Would you be open to removing these force-unwraps?
It also seems it is more prevalent use
x != nil
...x!
instead of usingif let
orguard let
.Would you accept a pull request that addresses the force-unwraps and replaces them with safer options (errors, logging, fallbacks)?