summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/async_dag.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/async_dag.rs b/src/async_dag.rs
index f882b4d..589ed9f 100644
--- a/src/async_dag.rs
+++ b/src/async_dag.rs
@@ -15,8 +15,9 @@ pub struct AsyncDag<Id, N, Backend>
N: Node<Id = Id>,
Backend: DagBackend<Id, N>
{
- head: N,
+ head: Id,
backend: Backend,
+ _node: std::marker::PhantomData<N>,
}
impl<Id, N, Backend> AsyncDag<Id, N, Backend>
@@ -30,8 +31,9 @@ impl<Id, N, Backend> AsyncDag<Id, N, Backend>
.await?
.map(|node| {
AsyncDag {
- head: node,
- backend: backend
+ head: node.id().clone(),
+ backend: backend,
+ _node: std::marker::PhantomData,
}
})
.ok_or_else(|| anyhow!("Head not found in backend"))
@@ -80,7 +82,7 @@ impl<Id, N, Backend> AsyncDag<Id, N, Backend>
dag: self,
backlog: {
let mut v = Vec::with_capacity(2);
- v.push(self.backend.get(self.head.id().clone()));
+ v.push(self.backend.get(self.head.clone()));
v
}
}