Skip to content

Remove all mod.rs files#1400

Merged
tomaka merged 3 commits into
libp2p:masterfrom
tomaka:rm-mod-rs
Jan 28, 2020
Merged

Remove all mod.rs files#1400
tomaka merged 3 commits into
libp2p:masterfrom
tomaka:rm-mod-rs

Conversation

@tomaka

@tomaka tomaka commented Jan 21, 2020

Copy link
Copy Markdown
Member

As part of Rust edition 2018, you are now encouraged to use foo.rs rather than foo/mod.rs.
Half of the code of rust-libp2p was using the old idiom, and the other half the new idiom. This PR unifies all of this.

@mxinden

mxinden commented Jan 22, 2020

Copy link
Copy Markdown
Member

As part of Rust edition 2018, you are now encouraged to use foo.rs rather than foo/mod.rs.

@tomaka can you cite a reference here? I could only find doc.rust-lang.org and this reddit article but neither say that one is encouraged over the other.

👍 for being consistent across the project, whichever style we use.

@tomaka

tomaka commented Jan 27, 2020

Copy link
Copy Markdown
Member Author

Ping for reviews?
I admit that I expected this change to be straight-forward.

@tomaka tomaka merged commit 4bf42d1 into libp2p:master Jan 28, 2020
@tomaka tomaka deleted the rm-mod-rs branch January 28, 2020 07:51
mxinden added a commit to mxinden/rust-libp2p that referenced this pull request Nov 10, 2021
To be consistent with the rest of the codebase, use harness.rs instead
of mod.rs.

See also libp2p#1400
mxinden added a commit that referenced this pull request Nov 13, 2021
…#2335)

To be consistent with the rest of the codebase, use harness.rs instead
of mod.rs.

See also #1400
santos227 pushed a commit to santos227/rustlib that referenced this pull request Jun 20, 2022
… (#2335)

To be consistent with the rest of the codebase, use harness.rs instead
of mod.rs.

See also libp2p/rust-libp2p#1400
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.

3 participants