Skip to main content

suggest_new_task_insert_index

Function suggest_new_task_insert_index 

Source
pub fn suggest_new_task_insert_index(queue: &QueueFile) -> usize
Expand description

Suggests the insertion index for new tasks based on the first task’s status.

Returns 1 if the first task has status Doing (insert after the in-progress task), otherwise returns 0 (insert at top of the queue). Returns 0 for empty queues.