impl One for Wrapping doesn't require Add

This commit is contained in:
Yoan Lecoq 2017-04-21 19:10:42 +02:00
parent 356a4ba5b5
commit 2172a9368b
1 changed files with 1 additions and 1 deletions

View File

@ -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())
}