From 3e74c93bb7702ed2007a833871de36dddefc0324 Mon Sep 17 00:00:00 2001 From: Zanie Date: Fri, 26 Jan 2024 14:43:23 -0600 Subject: [PATCH] Reduce changes to the minimum necessary --- crates/pep508-rs/src/verbatim_url.rs | 2 +- crates/puffin-resolver/src/error.rs | 3 +-- crates/puffin-resolver/src/pubgrub/package.rs | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/crates/pep508-rs/src/verbatim_url.rs b/crates/pep508-rs/src/verbatim_url.rs index 46bbf71f1..5ca0655d8 100644 --- a/crates/pep508-rs/src/verbatim_url.rs +++ b/crates/pep508-rs/src/verbatim_url.rs @@ -8,7 +8,7 @@ use regex::Regex; use url::Url; /// A wrapper around [`Url`] that preserves the original string. -#[derive(Debug, Clone, Eq, Ord, derivative::Derivative)] +#[derive(Debug, Clone, Eq, derivative::Derivative)] #[derivative(PartialEq, PartialOrd, Hash)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct VerbatimUrl { diff --git a/crates/puffin-resolver/src/error.rs b/crates/puffin-resolver/src/error.rs index b30a7dd2e..15f6c5c4b 100644 --- a/crates/puffin-resolver/src/error.rs +++ b/crates/puffin-resolver/src/error.rs @@ -3,7 +3,6 @@ use std::convert::Infallible; use std::fmt::Formatter; use indexmap::IndexMap; -use itertools::Itertools; use pubgrub::range::Range; use pubgrub::report::{DefaultStringReporter, DerivationTree, Reporter}; use url::Url; @@ -171,7 +170,7 @@ impl NoSolutionError { package_versions: &OnceMap, ) -> Self { let mut available_versions = IndexMap::default(); - for package in self.derivation_tree.packages().iter().sorted() { + for package in self.derivation_tree.packages() { match package { PubGrubPackage::Root(_) => {} PubGrubPackage::Python(PubGrubPython::Installed) => { diff --git a/crates/puffin-resolver/src/pubgrub/package.rs b/crates/puffin-resolver/src/pubgrub/package.rs index 130327fcf..eeab44b6c 100644 --- a/crates/puffin-resolver/src/pubgrub/package.rs +++ b/crates/puffin-resolver/src/pubgrub/package.rs @@ -10,7 +10,7 @@ use puffin_normalize::{ExtraName, PackageName}; /// 2. Uses the same strategy as pip and posy to handle extras: for each extra, we create a virtual /// package (e.g., `black[colorama]`), and mark it as a dependency of the real package (e.g., /// `black`). We then discard the virtual packages at the end of the resolution process. -#[derive(Debug, Clone, Eq, Derivative, PartialOrd, Ord)] +#[derive(Debug, Clone, Eq, Derivative, PartialOrd)] #[derivative(PartialEq, Hash)] pub enum PubGrubPackage { /// The root package, which is used to start the resolution process.