1pub trait FromInto<T> {
2 fn qfrom(t: T) -> Self;
3 fn qinto(self) -> T;
4}
5
6impl<T,U> FromInto<U> for T where T: From<U> + Into<U> {
7 #[inline]
8 fn qfrom(t: U) -> Self {
9 <T as From<U>>::from(t)
10 }
11 #[inline]
12 fn qinto(self) -> U {
13 <T as Into<U>>::into(self)
14 }
15}