build: fix Windows build when hyper feature is disabled #176
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.
Closes #174
This issue has been closed already because enabling the feature
hyper
is fixing the compilation error, but my understanding is that the build being broken when it is not enabled is still accidental and something undesirable that needs to be fixed.In this PR, I fixed that problem, and simplified a little bit the imports in conditional code for Windows by putting the
use
s directly into the conditional code.This allow local reasoning, rendering much easier understanding which imports are required when and why, avoiding both compilation errors and warnings various feature combinations.
Advice: ideally, you should test multiple feature combinations in your CI.
cargo-hack
is a common way of doing that.Do you think you could also release a hotfix release soon so we can benefit from this quickly, please?