You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: scheduler.rs
    path of file: ./repos/rd/src
    
    the code of the file until where you have to start completion: //! Overview of rd scheduling:
//!
//! rd honours priorities set by setpriority(2) --- even in situations where the
//! kernel doesn't, e.g. when a non-privileged task tries to increase its
//! priority. Normally rd honors priorities strictly by scheduling the highest
//! priority runnable task; tasks with equal priorities are scheduled in
//! round-robin fashion. Strict priority scheduling helps find bugs due to
//! starvation.
//!
//! When a task calls sched_yield we temporarily switch to a completely
//! fair scheduler that ignores priorities. All tasks are placed on a queue
//! and while the queue is non-empty we take the next task from the queue and
//! run it for a quantum if it's runnable. We d
    
    pub fn schedule_one_round_robin(&self, t: &RecordTask) {
        log!(
            LogDebug,
            "Scheduling round-robin because of task {}",
            t.tid()
        );

        let rc_t = t.weak_self_clone().upgrade().unwrap();
        ed_assert!(t, Rc::ptr_eq(&self.current().unwrap(), &rc_t));
        self.maybe_pop_round_robin_task(t);
        ed_assert!(t, !t.in_round_robin_queue.get());
        for PriorityTup(_, _, w) in self.task_priority_set.borrow().iter() {
            let tt = w.upgrade().unwrap();
            if !Rc::ptr_eq(&rc_t, &tt) && !tt.as_record_task().unwrap().in_round_robin_queue.get() {
                self.task_round_robin_queue
                    .borrow_mut()
                    .push_back(w.clone());
                tt.as_record_task().unwrap().in_round_robin_queue.set(true);
            }
        }

        self.task_priority_set.borrow_mut().clear();
        self.task_round_robin_queue
            .borrow_mut()
            .push_back(t.weak_self_clone());
        t.in_round_robin_queue.set(true);
        self.expire_timeslice();
    }