mirror of
https://github.com/pesde-pkg/pesde.git
synced 2025-04-18 10:53:56 +01:00
refactor: remove unused trait
This commit is contained in:
parent
5c43e3cb95
commit
a4f2829db2
1 changed files with 0 additions and 12 deletions
12
src/graph.rs
12
src/graph.rs
|
@ -96,15 +96,3 @@ pub struct DependencyGraphNodeWithTarget {
|
||||||
|
|
||||||
/// A graph of `DownloadedDependencyGraphNode`s
|
/// A graph of `DownloadedDependencyGraphNode`s
|
||||||
pub type DependencyGraphWithTarget = Graph<DependencyGraphNodeWithTarget>;
|
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()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue