Skip to content

refactor: name each module file after its module, not mod.rs - #16

Merged
elicbarbieri merged 2 commits into
mainfrom
refactor/no-mod-rs
Nov 9, 2026
Merged

elicbarbieri merged 2 commits into
mainfrom
refactor/no-mod-rs

Conversation

@zancas

@zancas zancas commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

What this PR does

This PR moves each module root from <name>/mod.rs to <name>.rs.
The new file sits beside the <name>/ directory.
Nine modules in five crates move.
No mod.rs file remains in the repository.

What this PR does not do

This PR changes no code.
Two edits follow from the moves:

  • The include_str! path in the zingod config tests loses one parent segment.
  • The zingod guide names daemon.rs where it named daemon/mod.rs.

The branch also holds one merge of main, which resolves the conflict with the validator cookie change.

Verification

  • cargo check --all-targets --all-features passes for the five crates with a moved file.
  • cargo fmt --all -- --check is clean.
  • The heavy proptest run for zingod-persistence passed on the merged tree: 3 rounds in the 180-second loop, 121 of 121 tests in each round.
  • The run of the crates built on zingod-persistence passed 361 of 363 tests. The two failures are daemon::index_snapshot tests in zingod. They need aria2c on PATH, which the test machine lacks, and they fail on main in the same way.
  • The heavy run used TMPDIR on an ext4 disk. On that machine /tmp is tmpfs, and the footprint test measures page-cache eviction, which tmpfs cannot show.

🤖 Generated with Claude Code

Nine modules with children kept their root in <name>/mod.rs. Each root
now lives in <name>.rs beside its <name>/ directory, the layout Rust has
preferred since the 2018 edition, so an editor tab or a diff header
names the module instead of showing nine files called mod.rs.

The moves change no code. Two edits follow from them: the include_str!
path to the example config in the zingod config tests loses one parent
segment, and the zingod guide names daemon.rs where it named
daemon/mod.rs.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@elicbarbieri
elicbarbieri merged commit b990221 into main Nov 9, 2026
3 checks passed
@elicbarbieri
elicbarbieri deleted the refactor/no-mod-rs branch November 9, 2026 21:54
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