linebender / piet

An abstraction for 2D graphics.
Apache License 2.0
1.23k stars 95 forks source link

Impl Default for piet-svg Text and remove `new` method #542

Closed matthunz closed 1 year ago

matthunz commented 1 year ago

This removes the need for #[allow(clippy::new_without_default)]

jneem commented 1 year ago

Thanks for the PR! I don't have a strong opinion about the presence of default vs new, although I wonder if whoever added that allow option had a reason for it...

Given that removing new is a breaking change, though, I'd advocate for keeping it there and just adding the default.

cmyr commented 1 year ago

I don't actually remember the rationale for wanting to avoid default, here, but in any case we definitely want to keep the new method, although I do not see any harm in also adding an impl of Default.

matthunz commented 1 year ago

Makes sense to me! I added new back that just uses the default implentation in cf03df5