Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{curve,ed}25519-dalek: clippy fixes #710

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

baloo
Copy link
Contributor

@baloo baloo commented Sep 30, 2024

Clippy 1.81 brings new lints, this fixes those warnings

Clippy 1.81 brings new lints, this fixes those warnings
@@ -240,7 +240,9 @@ impl u64x4 {
pub const fn new_const(x0: u64, x1: u64, x2: u64, x3: u64) -> Self {
// SAFETY: Transmuting between an array and a SIMD type is safe
// https://rust-lang.github.io/unsafe-code-guidelines/layout/packed-simd-vectors.html
unsafe { Self(core::mem::transmute([x0, x1, x2, x3])) }
unsafe {
Self(core::mem::transmute::<[u64; 4], core::arch::x86_64::__m256i>([x0, x1, x2, x3]))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will merge this as-is to prevent conflicts on your other branch, but core::arch::x86_64::__m256i is probably worth importing so you can just call this __m256i (here and below)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the only reason I went with the full name was because it was already used that way higher up in the script. I'm not familiar enough with simd to know whether _m256i exists elsewhere (in which case the full name might be intended)

@tarcieri tarcieri merged commit cbf794d into dalek-cryptography:main Sep 30, 2024
23 checks passed
@baloo baloo deleted the baloo/clippy-fixes branch September 30, 2024 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants