impl One for Wrapping doesn't require Add
This commit is contained in:
parent
356a4ba5b5
commit
2172a9368b
|
@ -105,7 +105,7 @@ one_impl!(i64, 1i64);
|
|||
one_impl!(f32, 1.0f32);
|
||||
one_impl!(f64, 1.0f64);
|
||||
|
||||
impl<T: One> One for Wrapping<T> where Wrapping<T>: Add<Output=Wrapping<T>> + Mul<Output=Wrapping<T>> {
|
||||
impl<T: One> One for Wrapping<T> where Wrapping<T>: Mul<Output=Wrapping<T>> {
|
||||
fn one() -> Self {
|
||||
Wrapping(T::one())
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue