Use more Into<Point> instead of Point for arguments#466
Use more Into<Point> instead of Point for arguments#466sagudev merged 1 commit intolinebender:mainfrom
Into<Point> instead of Point for arguments#466Conversation
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Into<T> insted of T for argumentsInto<T> insted of T for arguments
|
It would be nice to also do this on traits (Shape, paramcurves*), but that would be breaking change. |
tomcur
left a comment
There was a problem hiding this comment.
I'm cautiously in favor of doing this for Point, but we may want to make sure we only do this for types whose From impls are free (within the confines of this crate). Otherwise the API would hide conversions that could potentially needlessly slow down user code, if the same conversions are performed multiple times.
From<TranslateScale> for Affine is not quite free, and, e.g., for Rect (not included here), From<(Point, Size)> and From<euclid::Rect<f64, UnknownUnit>> aren't free.
I agree. I forgot that |
Into<T> insted of T for argumentsInto<Point> insted of Point for arguments
Into<Point> insted of Point for argumentsInto<Point> instead of Point for arguments
We already did for most of
Pointarguments. This is especially relevant for users of euclid now that we have #463.