fn cast_t2u<T, U>(x: T) -> U
where
    T: Num + NumCast + Copy,
    U: Num + NumCast + Copy,
{
    U::from(x).unwrap()
}
/// cast a numeric value with type T to one with U
cast a numeric value with type T to one with U
cast a numeric value with type T to one with U
fn cast_t2u<T, U>(x: T) -> U
where
    T: Num + NumCast + Copy,
    U: Num + NumCast + Copy,
{
    U::from(x).unwrap()
}
fn cast_t2u < T , U > ( x : T ) -> U where T : Num + NumCast + Copy , U : Num + NumCast + Copy , { U :: from ( x ) . unwrap ( ) }
cast a numeric value with type T to one with U
cast a numeric value with type T to one with U
x
T
x
T