Light Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3ffdc4e

Browse files
authored
elliptic-curve: fix clippy::unnecessary_safety_comment lint (#2314)
1 parent 4b761ca commit 3ffdc4e

File tree

2 files changed

+4
-2
lines changed
  • elliptic-curve/src
    • point
      • non_identity.rs
    • scalar
      • nonzero.rs

2 files changed

+4
-2
lines changed

elliptic-curve/src/point/non_identity.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ use crate::{BatchNormalize, CurveArithmetic, CurveGroup, NonZeroScalar, Scalar};
2323
/// In the context of ECC, it's useful for ensuring that certain arithmetic
2424
/// cannot result in the identity point.
2525
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
26-
#[repr(transparent)] // SAFETY: needed for `unsafe` safety invariants below
26+
// `repr` is needed for `unsafe` safety invariants below
27+
#[repr(transparent)]
2728
pub struct NonIdentity<P> {
2829
point: P,
2930
}

elliptic-curve/src/scalar/nonzero.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ use serdect::serde::{Deserialize, Serialize, de, ser};
3333
/// In the context of ECC, it's useful for ensuring that scalar multiplication
3434
/// cannot result in the point at infinity.
3535
#[derive(Clone)]
36-
#[repr(transparent)] // SAFETY: needed for `unsafe` safety invariants below
36+
// `repr` is needed for `unsafe` safety invariants below
37+
#[repr(transparent)]
3738
pub struct NonZeroScalar<C>
3839
where
3940
C: CurveArithmetic,

0 commit comments

Comments
(0)