Repository navigation
refactor: name each module file after its module, not mod.rs - #16
Merged
Merged
Conversation
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
approved these changes
Nov 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
This PR moves each module root from
<name>/mod.rsto<name>.rs.The new file sits beside the
<name>/directory.Nine modules in five crates move.
No
mod.rsfile remains in the repository.What this PR does not do
This PR changes no code.
Two edits follow from the moves:
include_str!path in thezingodconfig tests loses one parent segment.zingodguide namesdaemon.rswhere it nameddaemon/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-featurespasses for the five crates with a moved file.cargo fmt --all -- --checkis clean.zingod-persistencepassed on the merged tree: 3 rounds in the 180-second loop, 121 of 121 tests in each round.zingod-persistencepassed 361 of 363 tests. The two failures aredaemon::index_snapshottests inzingod. They needaria2conPATH, which the test machine lacks, and they fail onmainin the same way.TMPDIRon an ext4 disk. On that machine/tmpis tmpfs, and thefootprinttest measures page-cache eviction, which tmpfs cannot show.🤖 Generated with Claude Code