Maybe don't do this. If I impl Into<Point> for MyType, then MyType.into() consumes MyType and returns Point. Sometimes I have a MyType which I don't want to consume, but I want to get a Point. That's the reason for using Borrow<Point>. I can easily impl Borrow<Point> for MyType, but I can't impl<T> Into<Point> for T where T: Borrow<Point> because you can only blanket implement a trait that you wrote in your own crate.
Maybe don't do this. If I
impl Into<Point> for MyType
, then MyType.into() consumes MyType and returns Point. Sometimes I have a MyType which I don't want to consume, but I want to get a Point. That's the reason for usingBorrow<Point>
. I can easilyimpl Borrow<Point> for MyType
, but I can'timpl<T> Into<Point> for T where T: Borrow<Point>
because you can only blanket implement a trait that you wrote in your own crate.