Skip to content

Conversation

@carols10cents
Copy link
Contributor

And move crates from regular to dev-dependencies when they're only used in tests.

Found by the unused crate lint and removed to help prevent unnecessary dependency hell when upgrading hyper to 1.0, but committed separately from enabling the lint permanently.

This lint has a number of "false positives" that are due to being unable to specify per-target dependencies; see these issues for more info:

I'm most interested in the first commit here that cleans up existing unused crates.

I won't be offended if you don't want the second commit that will make you have to clean up or explicitly allow actual unused crates or false positives going forward. I'm happy to rebase out the 2nd commit, just say the word!

  • I've read the contributing section of the project README.
  • Signed CLA (if not already signed).
And move crates from regular to dev-dependencies when they're only used
in tests.

Found by the unused crate lint and removed to help prevent unnecessary
dependency hell when upgrading hyper to 1.0, but committed separately
from enabling the lint permanently.
But allow/expect/explicitly `use as _` for false positives of the lint
because it isn't possible to currently specify that a dependency is only
used in unit tests but not integration tests, or only used in a
benchmark but not unit tests, or only used in the bin but not the lib.

See these issues:

- <rust-lang/rust#57274>
- <rust-lang/rust#95513>
@hiltontj hiltontj added the v3 label Jul 2, 2025
Copy link
Contributor

@hiltontj hiltontj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a welcome change IMHO - though it has been some time since the PR was opened so a rebase/merge is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 participants