refactor: remove unused trait

This commit is contained in:
daimond113 2025-02-14 23:09:44 +01:00
parent 5c43e3cb95
commit a4f2829db2
No known key found for this signature in database
GPG key ID: 640DC95EC1190354

View file

@ -96,15 +96,3 @@ pub struct DependencyGraphNodeWithTarget {
/// A graph of `DownloadedDependencyGraphNode`s
pub type DependencyGraphWithTarget = Graph<DependencyGraphNodeWithTarget>;
/// A trait for converting a graph to a different type of graph
pub trait ConvertableGraph<Node> {
/// Converts the graph to a different type of graph
fn convert(self) -> Graph<Node>;
}
impl ConvertableGraph<DependencyGraphNode> for DependencyGraphWithTarget {
fn convert(self) -> Graph<DependencyGraphNode> {
self.into_iter().map(|(id, node)| (id, node.node)).collect()
}
}