Remove UpgradeSelection struct (#15422)

## Summary

After #15395, I realized that we didn't actually need a separate struct
for this since we now pass it around as an `Option`. (The key change
from #15395 is that when combining, we treat the options as a single
unit.)
This commit is contained in:
Charlie Marsh
2025-08-21 19:35:07 +01:00
committed by GitHub
parent 11633549fd
commit e4de538dae
6 changed files with 66 additions and 116 deletions
+3 -3
View File
@@ -1,7 +1,7 @@
use anstream::eprintln;
use uv_cache::Refresh;
use uv_configuration::UpgradeSelection;
use uv_configuration::Upgrade;
use uv_distribution_types::{ConfigSettings, PackageConfigSettings, Requirement};
use uv_resolver::{ExcludeNewer, ExcludeNewerPackage, PrereleaseMode};
use uv_settings::{Combine, PipOptions, ResolverInstallerOptions, ResolverOptions};
@@ -334,7 +334,7 @@ pub fn resolver_options(
.filter_map(Maybe::into_option)
.collect()
}),
upgrade: UpgradeSelection::from_args(
upgrade: Upgrade::from_args(
flag(upgrade, no_upgrade, "no-upgrade"),
upgrade_package.into_iter().map(Requirement::from).collect(),
),
@@ -445,7 +445,7 @@ pub fn resolver_installer_options(
.filter_map(Maybe::into_option)
.collect()
}),
upgrade: UpgradeSelection::from_args(
upgrade: Upgrade::from_args(
flag(upgrade, no_upgrade, "upgrade"),
upgrade_package.into_iter().map(Requirement::from).collect(),
),