Skip to content

refactor: modernize production module layout to use Rust 2018 style - #165

Merged
ejj merged 1 commit into
NetSys:mainfrom
justinpettit:refactor/remove-mod-rs
Jun 20, 2026
Merged

ejj merged 1 commit into
NetSys:mainfrom
justinpettit:refactor/remove-mod-rs

Conversation

@justinpettit

@justinpettit justinpettit commented Jun 20, 2026 •

Copy link
Copy Markdown
Collaborator

Migrate the production source code hierarchy away from the legacy mod.rs pattern to the idiomatic foo.rs and matching foo/ directory style. This aligns the codebase with modern Rust standards, improves explicit module discoverability, and resolves editor tab name clutter.

Deliberately retained the traditional tests/helpers/mod.rs structure for shared integration test utilities. Because Cargo treats every root-level file inside the tests/ directory as an independent crate root, applying the new module layout style here causes Cargo to misinterpret helper code as standalone test suites. Using a nested mod.rs file inside a sub-directory allows the compiler to use its native module resolution loops perfectly without breaking standard tooling like cargo fmt and cargo clippy.

Migrate the production source code hierarchy away from the legacy `mod.rs`
pattern to the idiomatic `foo.rs` and matching `foo/` directory style. This
aligns the codebase with modern Rust standards, improves explicit module
discoverability, and resolves editor tab name clutter.

Deliberately retained the traditional `tests/helpers/mod.rs` structure for
shared integration test utilities. Because Cargo treats every root-level file
inside the `tests/` directory as an independent crate root, applying the
new module layout style here causes Cargo to misinterpret helper code as
standalone test suites. Using a nested `mod.rs` file inside a
sub-directory allows the compiler to use its native module resolution loops
perfectly without breaking standard tooling like `cargo fmt` and `cargo clippy`.
@justinpettit justinpettit changed the title refactor/remove mod rs refactor: modernize production module layout to use Rust 2018 style Jun 20, 2026
@ejj
ejj requested review from ejj and ejj-agent June 20, 2026 20:17
@ejj
ejj merged commit 2942493 into NetSys:main Jun 20, 2026
1 check passed
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