Skip to content

chore: remove redundant imports, extern crates and the experimental feature - #316

Merged
FalkWoldmann merged 1 commit into
masterfrom
remove-unused-code
Sep 27, 2026
Merged

FalkWoldmann merged 1 commit into
masterfrom
remove-unused-code

Conversation

@FalkWoldmann

Copy link
Copy Markdown
Member

Leftovers from a dead code sweep on nightly that #291 doesn't cover:

  • 13 imports the 2024 prelude or a parent use super::* already provides (TryFrom, TryInto, Future, a duplicate http, and two test-only ones)
  • the extern crate httpmock; lines in two tests (one used self::httpmock::…, now a plain use httpmock::…)
  • the experimental feature, which gates nothing. Removing it is technically breaking for anyone who enables it, so it's in the 0.9.0 changelog.

Also turns on redundant_imports and unused_extern_crates, so CI fails if these come back. Both lints exist on 1.88, so MSRV is fine.

#291 will need a one-line conflict fix in src/common/util.rs after this; it already has to merge master for adapter.rs.

Unrelated: tools/ depends on httpmock but doesn't use it (nightly cargo warns). Left alone here.

…eature

The 2024 prelude already has TryFrom, TryInto and Future. The two test
extern crate lines went away with the self::httpmock path they enabled.
The experimental feature gated nothing.

Enable redundant_imports and unused_extern_crates so these stay gone.
@codecov

codecov Bot commented Sep 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@FalkWoldmann
FalkWoldmann merged commit 9dcb79f into master Sep 27, 2026
16 checks passed
FalkWoldmann added a commit to danieleades/httpmock that referenced this pull request Sep 27, 2026
Also fixes what master broke without conflicts: gate the cookie readers now that httpmock#297 made cookies optional, drop the KeyValueOperator variants nothing constructs since httpmock#312 made matchers private, and remove a TryInto import the redundant_imports lint from httpmock#316 rejects.
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.

1 participant