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

Removing force unwrapping in SVGParser #733

Merged
merged 1 commit into from
Oct 19, 2020

Conversation

TomasLinhart
Copy link
Contributor

After the discussion in #732 I went ahead and removed all force unwrapping from SVGParser. Some of it was safe, and it would never crash. Although, I still think it is a bad practice to use it, so I replaced it with other ways Swift has.

Nevertheless, many of these force unwrappings would actually result in a crash if somebody provided a non-ideal SVG.

I have also added some logging, but I guess it requires a bigger overhaul that is beyond my intention at this moment.

Let me know if you would prefer to do something differently.

@ystrot ystrot self-assigned this Oct 19, 2020
@ystrot ystrot added this to the 0.9.8 milestone Oct 19, 2020
@ystrot ystrot merged commit faf3ab8 into exyte:master Oct 19, 2020
@ystrot
Copy link
Member

ystrot commented Oct 19, 2020

Thanks for these fixes!

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