Skip to content

Commit 9e04a58

Browse files
authored
curve: fully migrate to 2018 module conventions (#844)
Enforced via the newly added `clippy::mod_module_files` lint. Previously a mixture of 2015 (`mod.rs`) module files along with the 2018 `foo.rs` and `foo/` approach. All of the toplevel modules (`edwards`, `field`, `montgomery`, and `scalar`) were using the 2018 convention, except for `backend`, `ristretto`, and the recently added `lizard` were using the 2015 convention. This renames the files so everything follows the 2018 convention, and applies the afforementioned clippy lint which will error if anyone tries to add new files using the 2015 convention.
1 parent b76b924 commit 9e04a58

File tree

15 files changed

+8
-7
lines changed

15 files changed

+8
-7
lines changed
File renamed without changes.
File renamed without changes.

curve25519-dalek/src/backend/serial/fiat_u32/mod.rs renamed to curve25519-dalek/src/backend/serial/fiat_u32.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
//! This uses the formally-verified field arithmetic generated by the
1818
//! [fiat-crypto project](https://github.com/mit-plv/fiat-crypto)
1919
20-
#[path = "../u32/scalar.rs"]
20+
#[path = "./u32/scalar.rs"]
2121
pub mod scalar;
2222

2323
pub mod field;
2424

25-
#[path = "../u32/constants.rs"]
25+
#[path = "./u32/constants.rs"]
2626
pub mod constants;

curve25519-dalek/src/backend/serial/fiat_u64/mod.rs renamed to curve25519-dalek/src/backend/serial/fiat_u64.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
//! (allowing the CPU to compute two carry chains in parallel). These
2020
//! will be used if available.
2121
22-
#[path = "../u64/scalar.rs"]
22+
#[path = "./u64/scalar.rs"]
2323
pub mod scalar;
2424

2525
pub mod field;
2626

27-
#[path = "../u64/constants.rs"]
27+
#[path = "./u64/constants.rs"]
2828
pub mod constants;
File renamed without changes.
File renamed without changes.
File renamed without changes.

curve25519-dalek/src/backend/vector/mod.rs renamed to curve25519-dalek/src/backend/vector.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// - isis agora lovecruft <[email protected]>
1010
// - Henry de Valence <[email protected]>
1111

12-
#![doc = include_str!("../../../docs/parallel-formulas.md")]
12+
#![doc = include_str!("../../docs/parallel-formulas.md")]
1313

1414
#[allow(missing_docs)]
1515
pub mod packed_simd;

curve25519-dalek/src/backend/vector/avx2/mod.rs renamed to curve25519-dalek/src/backend/vector/avx2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// - isis agora lovecruft <[email protected]>
1010
// - Henry de Valence <[email protected]>
1111

12-
#![doc = include_str!("../../../../docs/avx2-notes.md")]
12+
#![doc = include_str!("../../../docs/avx2-notes.md")]
1313

1414
pub(crate) mod field;
1515

0 commit comments

Comments
 (0)