From 1f454f3a67dfecfc466d6a504b49d35d16f82b22 Mon Sep 17 00:00:00 2001 From: Jo <10510431+j178@users.noreply.github.com> Date: Sun, 7 Jul 2024 03:16:52 +0800 Subject: [PATCH] Revert `uninstall` deduplication changes from #4841 (#4842) `matching_installations` is BTreeSet already, no need to deduplicate it. https://github.com/astral-sh/uv/pull/4841#discussion_r1667241722 --- crates/uv-python/src/managed.rs | 4 ++-- crates/uv/src/commands/python/uninstall.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/uv-python/src/managed.rs b/crates/uv-python/src/managed.rs index 07b33035d..74f5899d9 100644 --- a/crates/uv-python/src/managed.rs +++ b/crates/uv-python/src/managed.rs @@ -228,8 +228,8 @@ static EXTERNALLY_MANAGED: &str = "[externally-managed] Error=This Python installation is managed by uv and should not be modified. "; -/// A uv-managed Python installation on the current system.. -#[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] +/// A uv-managed Python installation on the current system. +#[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd)] pub struct ManagedPythonInstallation { /// The path to the top-level directory of the installed Python. path: PathBuf, diff --git a/crates/uv/src/commands/python/uninstall.rs b/crates/uv/src/commands/python/uninstall.rs index e8de59fc3..67fbe8ea8 100644 --- a/crates/uv/src/commands/python/uninstall.rs +++ b/crates/uv/src/commands/python/uninstall.rs @@ -84,7 +84,7 @@ pub(crate) async fn uninstall( return Ok(ExitStatus::Failure); } - let tasks = futures::stream::iter(matching_installations.iter().unique()) + let tasks = futures::stream::iter(matching_installations.iter()) .map(|installation| async { ( installation.key(),