summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/async_dag.rs35
1 files changed, 0 insertions, 35 deletions
diff --git a/src/async_dag.rs b/src/async_dag.rs
index 1566e72..7de8d4f 100644
--- a/src/async_dag.rs
+++ b/src/async_dag.rs
@@ -65,29 +65,6 @@ impl<Id, N, Backend> AsyncDag<Id, N, Backend>
})
}
- pub async fn get_next(&self, id: Id) -> Result<Vec<N>> {
- self.backend
- .get(id)
- .await?
- .map(|tpl| tpl.1)
- .ok_or_else(|| anyhow!("ID Not found"))?
- .parent_ids()
- .into_iter()
- .map(|id| async move {
- self.backend
- .get(id)
- .await
- .transpose()
- })
- .collect::<futures::stream::FuturesUnordered<_>>()
- .collect::<Vec<_>>()
- .await
- .into_iter()
- .filter_map(|o| o)
- .map(|r| r.map(|tpl| tpl.1))
- .collect()
- }
-
/// Iterate over the DAG
///
/// This function returns a Stream over all nodes in the DAG.
@@ -264,18 +241,6 @@ mod tests {
let has_id = has_id.unwrap();
assert!(has_id);
}
-
- {
- let next = tokio_test::block_on(dag.get_next(test::Id(1)));
- assert!(next.is_ok());
- let mut next = next.unwrap();
- assert_eq!(next.len(), 1);
- let node = next.pop();
- assert!(node.is_some());
- let node = node.unwrap();
- assert_eq!(node.data, 0);
- assert!(node.parents.is_empty());
- }
}
#[test]