Depend on futures-util instead of futures
This commit is contained in:
1 parent
f342e33f16
commit
a75defa5a6
79 files changed
+447
-380
No files matched your search
@@ -35,7 +35,7 @@
|
||||
//! ```
|
||||
|
||||
use dagx::{task, DagRunner, TaskHandle};
|
||||
use futures::FutureExt;
|
||||
|
||||
|
||||
#[derive(Debug)]
|
||||
struct User {
|
||||
@@ -107,7 +107,7 @@ async fn main() {
|
||||
let validation = dag.add_task(ValidateUser).depends_on(user_task);
|
||||
|
||||
// Execute the DAG
|
||||
dag.run(|fut| tokio::spawn(fut).map(Result::unwrap))
|
||||
dag.run(|fut| async move { tokio::spawn(fut).await.unwrap() })
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
|
||||
Reference in new issue
Block a user