Skip to content

Commit

Permalink
Remove version from graph edge (astral-sh#4165)
Browse files Browse the repository at this point in the history
## Summary

We're actually not using the edge data, so lets remove it.
  • Loading branch information
charliermarsh authored Jun 8, 2024
1 parent 7c07ca8 commit ab0f8af
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/uv-resolver/src/resolution/graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use crate::{
#[derive(Debug)]
pub struct ResolutionGraph {
/// The underlying graph.
pub(crate) petgraph: Graph<AnnotatedDist, Version, Directed>,
pub(crate) petgraph: Graph<AnnotatedDist, (), Directed>,
/// The range of supported Python versions.
pub(crate) requires_python: Option<RequiresPython>,
/// Any diagnostics that were encountered while building the graph.
Expand Down Expand Up @@ -76,7 +76,7 @@ impl ResolutionGraph {
}

// Add every package to the graph.
let mut petgraph: Graph<AnnotatedDist, Version, Directed> =
let mut petgraph: Graph<AnnotatedDist, (), Directed> =
Graph::with_capacity(resolution.packages.len(), resolution.packages.len());
let mut inverse: FxHashMap<NodeKey, NodeIndex<u32>> = FxHashMap::with_capacity_and_hasher(
resolution.packages.len(),
Expand Down Expand Up @@ -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, ());
}
}

Expand Down

0 comments on commit ab0f8af

Please sign in to comment.