We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Self
Wrapping
1 parent 6ab6de2 commit 67d9e74Copy full SHA for 67d9e74
src/identities.rs
@@ -92,7 +92,7 @@ impl<T: ConstZero> ConstZero for Wrapping<T>
92
where
93
Wrapping<T>: Add<Output = Wrapping<T>>,
94
{
95
- const ZERO: Self = Self(T::ZERO);
+ const ZERO: Self = Wrapping(T::ZERO);
96
}
97
98
/// Defines a multiplicative identity element for `Self`.
@@ -193,7 +193,7 @@ impl<T: ConstOne> ConstOne for Wrapping<T>
193
194
Wrapping<T>: Mul<Output = Wrapping<T>>,
195
196
- const ONE: Self = Self(T::ONE);
+ const ONE: Self = Wrapping(T::ONE);
197
198
199
// Some helper functions provided for backwards compatibility.
0 commit comments