From ab0f8afe1f7898c4ec12dc4b224e9b436ee6690d Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Sat, 8 Jun 2024 10:39:02 -0700 Subject: [PATCH] Remove version from graph edge (#4165) ## Summary We're actually not using the edge data, so lets remove it. --- crates/uv-resolver/src/resolution/graph.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/uv-resolver/src/resolution/graph.rs b/crates/uv-resolver/src/resolution/graph.rs index 4363aecec2bc..324d391ec5e7 100644 --- a/crates/uv-resolver/src/resolution/graph.rs +++ b/crates/uv-resolver/src/resolution/graph.rs @@ -31,7 +31,7 @@ use crate::{ #[derive(Debug)] pub struct ResolutionGraph { /// The underlying graph. - pub(crate) petgraph: Graph, + pub(crate) petgraph: Graph, /// The range of supported Python versions. pub(crate) requires_python: Option, /// Any diagnostics that were encountered while building the graph. @@ -76,7 +76,7 @@ impl ResolutionGraph { } // Add every package to the graph. - let mut petgraph: Graph = + let mut petgraph: Graph = Graph::with_capacity(resolution.packages.len(), resolution.packages.len()); let mut inverse: FxHashMap> = FxHashMap::with_capacity_and_hasher( resolution.packages.len(), @@ -311,7 +311,7 @@ impl ResolutionGraph { versions.to_extra.as_ref(), versions.to_dev.as_ref(), )]; - petgraph.update_edge(from_index, to_index, versions.to_version.clone()); + petgraph.update_edge(from_index, to_index, ()); } }