Hi,
could the standard library feature From
implementations for various collections such as
impl<T: Hash + Clone> From<HashSet<T>> for Vec<T> {
fn from(set: HashSet<T>) -> Self {
set.iter().map(Clone::clone).collect()
}
}
in the future?
Is this a good idea?
Currently we can not implement this generic impl
ourselves, because of
[rustc E0117] [E] only traits defined in the current crate can be implemented for arbitrary types
impl doesn't use only types from inside the current crate
note: define and implement a trait or new type instead