Enforce URL constraints for non-URL dependencies (#1565)

## Summary

This was just a missing line -- we have `dependencies.remove(&package);`
in the ~identical branch above, but it must've been an oversight to omit
it here.

Closes https://github.com/astral-sh/uv/issues/1467.

## Test Plan

`cargo test`
This commit is contained in:
Charlie Marsh 2024-02-16 22:11:28 -05:00 committed by GitHub
parent f897ee3f88
commit 4a09889c80
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 64 additions and 0 deletions

View file

@ -121,6 +121,7 @@ impl PubGrubDependencies {
// Merge the package.
if let Some(package) = merge_package(entry.0, &package)? {
dependencies.remove(&package);
dependencies.insert(package, version);
} else {
dependencies.insert(package, version);