Skip to content

Conversation

@BD103
Copy link
Contributor

@BD103 BD103 commented Nov 26, 2024

There are two modules in clippy_utils that are currently in the form of:

src/
  | ast_utils/
  | ty/
  |
  | ast_utils.rs
  | ty.rs

This PR moves the top-level modules to become mod.rs, within their respective folders.

src/
  | ast_utils/
  |   | mod.rs
  |
  | ty/
  |   | mod.rs

This reduces clutter in the src folder, and makes it easier to find related files in certain editors.1 This also appears to be the standard used in other crates in this repository, though I looked very briefly.

I do realize that this is a style / opinionated change, so I'll close it if it receives much push-back. :)

changelog: none
  • cargo test passes locally
  • Run cargo dev fmt

Footnotes

  1. I use VSCode, which groups all folders together and all files separately. This means that ty.rs is quite "far" away from the ty/ folder, which makes it move difficult to navigate between the two.

@rustbot
Copy link
Collaborator

rustbot commented Nov 26, 2024

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @llogiq (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Nov 26, 2024
@bors
Copy link
Contributor

bors commented Nov 28, 2024

☔ The latest upstream changes (presumably ff4a26d) made this pull request unmergeable. Please resolve the merge conflicts.

@BD103
Copy link
Contributor Author

BD103 commented Nov 29, 2024

I believe I fixed the merge conflicts with git pull --rebase upstream master, but let me know if I did something additional!

@llogiq llogiq added this pull request to the merge queue Dec 8, 2024
@llogiq
Copy link
Contributor

llogiq commented Dec 8, 2024

Thank you. Sorry for taking so long.

Merged via the queue into rust-lang:master with commit ec37eb6 Dec 8, 2024
9 checks passed
@BD103
Copy link
Contributor Author

BD103 commented Dec 8, 2024

Thank you. Sorry for taking so long.

No rush, I'm just glad to help out :)

@BD103 BD103 deleted the refactor-mod-rs branch December 8, 2024 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants