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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing I've done before when the code didn't need to change at all is to have a wide version range:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wouldn't really be correct. Because
phf
has aphf_codegen
crate it's possible for Cargo to resolvephf
0.9 andphf_codegen
0.10, which could possibly be bad.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be the responsibility of the phf crate to specify which phf_codegen crate it needs.
If this crate allowed phf {0.8,0.9,0.10} then Cargo could pick any one of those, then would resolve the dependencies for the version it picked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
phf_codegen
is abuild-dependency
for this crate (see below), and there would be nothing stopping Cargo from picking a different version here. As far Cargo is concerned those crates are unrelated.