mirror of https://github.com/astral-sh/uv
Remove redundant index from preference key (#11543)
## Summary We already filter by this on Line 201.
This commit is contained in:
parent
985e5be96e
commit
08ad56e590
|
|
@ -208,9 +208,6 @@ impl CandidateSelector {
|
||||||
// Prefer preferences that match the current environment.
|
// Prefer preferences that match the current environment.
|
||||||
let matches_env = env.included_by_marker(marker.pep508());
|
let matches_env = env.included_by_marker(marker.pep508());
|
||||||
|
|
||||||
// Prefer preferences that match the current index.
|
|
||||||
let matches_index = index.is_none_or(|index| entry.index().matches(index));
|
|
||||||
|
|
||||||
// Prefer the latest (or earliest) version.
|
// Prefer the latest (or earliest) version.
|
||||||
let version = if highest {
|
let version = if highest {
|
||||||
Either::Left(entry.pin().version())
|
Either::Left(entry.pin().version())
|
||||||
|
|
@ -218,7 +215,7 @@ impl CandidateSelector {
|
||||||
Either::Right(std::cmp::Reverse(entry.pin().version()))
|
Either::Right(std::cmp::Reverse(entry.pin().version()))
|
||||||
};
|
};
|
||||||
|
|
||||||
std::cmp::Reverse((matches_env, matches_index, version))
|
std::cmp::Reverse((matches_env, version))
|
||||||
});
|
});
|
||||||
|
|
||||||
Either::Right(
|
Either::Right(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue