chore: fix formatting for CI

This commit is contained in:
TechnoPorg committed 2026-02-11 23:07:23 +01:00
1 parent 7999996bca
commit b6ff1f81e6
32 files changed
+116 -81

No files matched your search

+10 -6
View File
@@ -3,7 +3,6 @@
use crate::common::task_fn;
use dagx::{DagResult, DagRunner, TaskHandle};
#[tokio::test]
async fn test_single_dependency() -> DagResult<()> {
let dag = DagRunner::new();
@@ -13,7 +12,8 @@ async fn test_single_dependency() -> DagResult<()> {
.add_task(task_fn::<i32, _, _>(|&x: &i32| x + 1))
.depends_on(source);
dag.run(|fut| async move { tokio::spawn(fut).await.unwrap() }).await?;
dag.run(|fut| async move { tokio::spawn(fut).await.unwrap() })
.await?;
assert_eq!(dag.get(dependent)?, 43);
Ok(())
@@ -44,7 +44,8 @@ async fn test_dependency_data_flow() -> DagResult<()> {
.add_task(task_fn::<(i32, i32), _, _>(|(s, p): (&i32, &i32)| s + p))
.depends_on((&sum, &product));
dag.run(|fut| async move { tokio::spawn(fut).await.unwrap() }).await?;
dag.run(|fut| async move { tokio::spawn(fut).await.unwrap() })
.await?;
// Note: sum and product are not sinks (final_result depends on them)
// Only final_result is a sink and can be retrieved
@@ -68,7 +69,8 @@ async fn test_dependencies_with_different_types() -> DagResult<()> {
))
.depends_on((int_source, string_source, bool_source));
dag.run(|fut| async move { tokio::spawn(fut).await.unwrap() }).await?;
dag.run(|fut| async move { tokio::spawn(fut).await.unwrap() })
.await?;
assert_eq!(dag.get(combined)?, "hello: 42 (true)");
Ok(())
@@ -89,7 +91,8 @@ async fn test_shared_dependencies() -> DagResult<()> {
})
.collect();
dag.run(|fut| async move { tokio::spawn(fut).await.unwrap() }).await?;
dag.run(|fut| async move { tokio::spawn(fut).await.unwrap() })
.await?;
// Verify all dependents got the correct value from shared
for (i, handle) in dependents.iter().enumerate() {
@@ -108,7 +111,8 @@ async fn test_multiple_source_nodes() -> DagResult<()> {
.map(|i| dag.add_task(task_fn::<(), _, _>(move |_: ()| i * 10)))
.collect();
dag.run(|fut| async move { tokio::spawn(fut).await.unwrap() }).await?;
dag.run(|fut| async move { tokio::spawn(fut).await.unwrap() })
.await?;
for (i, source) in sources.into_iter().enumerate() {
assert_eq!(dag.get(source)?, i as i32 * 10);