Browse Source

impl One for Wrapping doesn't require Add

Yoan Lecoq 8 năm trước cách đây
mục cha
commit
2172a9368b
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      traits/src/identities.rs

+ 1 - 1
traits/src/identities.rs

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