Consider the following code
struct Complex {
real: f64,
img: f64
}
impl From<T: Into<f64>> for Complex {
fn from(t: T) -> Complex {
Complex { real: t.into(), img: 0.0_f64 }
}
}
The complier gives error for the impl. Can someone tell me why, because I feel this should work on paper.
Help!