Skip to content

Commit 48517bc

Browse files
authored
elliptic-curve: remove redundant bounds (#1274)
Remove explicit bounds which are already ensured via supertrait bounds.
1 parent 8bd4261 commit 48517bc

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

elliptic-curve/src/public_key.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::{
44
point::NonIdentity, AffinePoint, CurveArithmetic, Error, NonZeroScalar, ProjectivePoint, Result,
55
};
66
use core::fmt::Debug;
7-
use group::{Curve as _, Group};
7+
use group::{Curve, Group};
88

99
#[cfg(feature = "alloc")]
1010
use alloc::boxed::Box;
@@ -20,7 +20,7 @@ use {
2020
crate::{
2121
point::PointCompression,
2222
sec1::{CompressedPoint, EncodedPoint, FromEncodedPoint, ModulusSize, ToEncodedPoint},
23-
Curve, FieldBytesSize,
23+
FieldBytesSize,
2424
},
2525
core::cmp::Ordering,
2626
subtle::CtOption,
@@ -122,7 +122,6 @@ where
122122
#[cfg(feature = "sec1")]
123123
pub fn from_sec1_bytes(bytes: &[u8]) -> Result<Self>
124124
where
125-
C: Curve,
126125
FieldBytesSize<C>: ModulusSize,
127126
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
128127
{
@@ -139,7 +138,7 @@ where
139138
#[cfg(feature = "alloc")]
140139
pub fn to_sec1_bytes(&self) -> Box<[u8]>
141140
where
142-
C: CurveArithmetic + PointCompression,
141+
C: PointCompression,
143142
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
144143
FieldBytesSize<C>: ModulusSize,
145144
{
@@ -167,7 +166,7 @@ where
167166
#[cfg(feature = "jwk")]
168167
pub fn from_jwk(jwk: &JwkEcKey) -> Result<Self>
169168
where
170-
C: Curve + JwkParameters,
169+
C: JwkParameters,
171170
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
172171
FieldBytesSize<C>: ModulusSize,
173172
{
@@ -178,7 +177,7 @@ where
178177
#[cfg(feature = "jwk")]
179178
pub fn from_jwk_str(jwk: &str) -> Result<Self>
180179
where
181-
C: Curve + JwkParameters,
180+
C: JwkParameters,
182181
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
183182
FieldBytesSize<C>: ModulusSize,
184183
{
@@ -189,7 +188,7 @@ where
189188
#[cfg(feature = "jwk")]
190189
pub fn to_jwk(&self) -> JwkEcKey
191190
where
192-
C: Curve + JwkParameters,
191+
C: JwkParameters,
193192
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
194193
FieldBytesSize<C>: ModulusSize,
195194
{
@@ -200,7 +199,7 @@ where
200199
#[cfg(feature = "jwk")]
201200
pub fn to_jwk_string(&self) -> String
202201
where
203-
C: Curve + JwkParameters,
202+
C: JwkParameters,
204203
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
205204
FieldBytesSize<C>: ModulusSize,
206205
{

0 commit comments

Comments
 (0)