fn advance_to_next_task(&mut self) {
        debug_assert_ne!(self.next_task, ScheduledTask::None);
        self.current_task = self.next_task.take();
        if let ScheduledTask::Some(tid) = self.current_task {
            self.current_schedule.push_task(tid);
        }

        // Safety: Unfortunately `ExecutionState` is a static, but `Entered<'a>` is tied to the
        // lifetime 'a of its corresponding Span, so we can't stash the `Entered` into
        // `self.current_span_entered` directly. Instead, we transmute `Entered<'a>` into
        // `Entered<'static>`. We make sure that it can never outlive 'a by dropping
        // `self.current_span_entered` before dropping the `self.current_span` it points to.
        self.current_span_entered.take();
        if let ScheduledTask::Some(tid) = self.current_task {
            self.current_span = span!(Level::INFO, "step", i = self.current_schedule.len() - 1, task = tid.0);
            self.current_span_entered = Some(unsafe { extend_span_entered_lt(self.current_span.enter()) });
        }
    }
/// Set the next task as the current task, and update our tracing span
Set the next task as the current task, and update our tracing span
Set the next task as the current task and update our tracing span
fn advance_to_next_task(&mut self) {
        debug_assert_ne!(self.next_task, ScheduledTask::None);
        self.current_task = self.next_task.take();
        if let ScheduledTask::Some(tid) = self.current_task {
            self.current_schedule.push_task(tid);
        }
        // Safety: Unfortunately `ExecutionState` is a static, but `Entered<'a>` is tied to the
        // lifetime 'a of its corresponding Span, so we can't stash the `Entered` into
        // `self.current_span_entered` directly. Instead, we transmute `Entered<'a>` into
        // `Entered<'static>`. We make sure that it can never outlive 'a by dropping
        // `self.current_span_entered` before dropping the `self.current_span` it points to.
        self.current_span_entered.take();
        if let ScheduledTask::Some(tid) = self.current_task {
            self.current_span = span!(Level::INFO, "step", i = self.current_schedule.len() - 1, task = tid.0);
            self.current_span_entered = Some(unsafe { extend_span_entered_lt(self.current_span.enter()) });
        }
    }
fn advance_to_next_task ( & mut self ) { debug_assert_ne ! ( self next_task ScheduledTask None ) ; self . current_task = self . next_task . take ( ) ; if let ScheduledTask :: Some ( tid ) = self . current_task { self . current_schedule . push_task ( tid ) ; } // Safety: Unfortunately `ExecutionState` is a static, but `Entered<'a>` is tied to the // lifetime 'a of its corresponding Span, so we can't stash the `Entered` into // `self.current_span_entered` directly. Instead, we transmute `Entered<'a>` into // `Entered<'static>`. We make sure that it can never outlive 'a by dropping // `self.current_span_entered` before dropping the `self.current_span` it points to. self . current_span_entered . take ( ) ; if let ScheduledTask :: Some ( tid ) = self . current_task { self . current_span = span ! ( Level INFO " " i self current_schedule len ( ) 1 task tid 0 ) ; self . current_span_entered = Some ( unsafe { extend_span_entered_lt ( self . current_span . enter ( ) ) } ) ; } }
Set the next task as the current task, and update our tracing span
Set the next task as the current task and update our tracing span
&mut self
&mut self