Reduce changes to the minimum necessary

This commit is contained in:
Zanie 2024-01-26 14:43:23 -06:00
parent f7d285c895
commit 3e74c93bb7
3 changed files with 3 additions and 4 deletions

View File

@ -8,7 +8,7 @@ use regex::Regex;
use url::Url; use url::Url;
/// A wrapper around [`Url`] that preserves the original string. /// 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)] #[derivative(PartialEq, PartialOrd, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct VerbatimUrl { pub struct VerbatimUrl {

View File

@ -3,7 +3,6 @@ use std::convert::Infallible;
use std::fmt::Formatter; use std::fmt::Formatter;
use indexmap::IndexMap; use indexmap::IndexMap;
use itertools::Itertools;
use pubgrub::range::Range; use pubgrub::range::Range;
use pubgrub::report::{DefaultStringReporter, DerivationTree, Reporter}; use pubgrub::report::{DefaultStringReporter, DerivationTree, Reporter};
use url::Url; use url::Url;
@ -171,7 +170,7 @@ impl NoSolutionError {
package_versions: &OnceMap<PackageName, VersionMap>, package_versions: &OnceMap<PackageName, VersionMap>,
) -> Self { ) -> Self {
let mut available_versions = IndexMap::default(); let mut available_versions = IndexMap::default();
for package in self.derivation_tree.packages().iter().sorted() { for package in self.derivation_tree.packages() {
match package { match package {
PubGrubPackage::Root(_) => {} PubGrubPackage::Root(_) => {}
PubGrubPackage::Python(PubGrubPython::Installed) => { PubGrubPackage::Python(PubGrubPython::Installed) => {

View File

@ -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 /// 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., /// 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. /// `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)] #[derivative(PartialEq, Hash)]
pub enum PubGrubPackage { pub enum PubGrubPackage {
/// The root package, which is used to start the resolution process. /// The root package, which is used to start the resolution process.