Note that standard library does not have a similar
&OwnedA -> OwnedB conversion. In all of the case where stdlib’s
From is parametrized by lifetimes, its either that lhs is naturally parametrized by a lifetime (like
From<Cow<'a, Path>> for PathBuf), or rhs has a lifetime (like
From<&'a PathBuf> for Cow<'a, Path>).
impl<'a, T: ?Sized + AsRef<OsStr>> From<&'a T> for PathBuf impl is the first-case, due to
In general, there are an awful lot of
From implementations, and that is great.
More doesn’t mean better. In general, if
From<A> for B reuses all allocations, adding
From<&A> for B would be a bad idea, because it might lead to unnecessary copies. Similarly, if you don’t reuse any allocations,
From<A> for B seems less than ideal, because it forces a needless