From 67d9e74acc4920777a5591c8bbc1a907da00b3f3 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Wed, 7 Feb 2024 16:25:03 -0800 Subject: [PATCH] Avoid `Self` constructor for `Wrapping` --- src/identities.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/identities.rs b/src/identities.rs index f036943..c30cd1d 100644 --- a/src/identities.rs +++ b/src/identities.rs @@ -92,7 +92,7 @@ impl ConstZero for Wrapping where Wrapping: Add>, { - const ZERO: Self = Self(T::ZERO); + const ZERO: Self = Wrapping(T::ZERO); } /// Defines a multiplicative identity element for `Self`. @@ -193,7 +193,7 @@ impl ConstOne for Wrapping where Wrapping: Mul>, { - const ONE: Self = Self(T::ONE); + const ONE: Self = Wrapping(T::ONE); } // Some helper functions provided for backwards compatibility.