Improve doc comment

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
This commit is contained in:
Lee Smet
2025-08-22 11:02:45 +02:00
parent e57c76fb36
commit e45e5939e9

View File

@@ -236,6 +236,7 @@ impl FlowDag {
/// - it exists in the DAG
/// - it is not already started or completed
/// - it has no dependencies, or all dependencies are completed
///
/// If any job has failed, the entire flow is considered failed and an error is returned.
pub fn ready_jobs(&self) -> DagResult<Vec<u32>> {
if let Some(failed_job) = self.failed_job {
@@ -333,7 +334,9 @@ impl FlowDag {
}
match self.failed_job {
Some(existing) if existing == job => Ok(()),
Some(existing) => Err(DagError::FlowFailed { failed_job: existing }),
Some(existing) => Err(DagError::FlowFailed {
failed_job: existing,
}),
None => {
self.failed_job = Some(job);
Ok(())