Lines Matching refs:current

120             current: self.head,  in cursor_front()
130 current: self.head, in cursor_front_mut()
141 current: self.tail, in cursor_back()
152 current: self.tail, in cursor_back_mut()
315 current: self as *const Node<T>, in remove_self()
425 current: *const Node<T>, field
434 if self.current.is_null() { in index()
443 if self.current.is_null() { in move_next()
444 self.current = self.list.head; in move_next()
447 self.current = unsafe { (*self.current).next }; in move_next()
456 if self.current.is_null() { in move_prev()
457 self.current = self.list.tail; in move_prev()
460 self.current = unsafe { (*self.current).prev }; in move_prev()
467 pub(crate) fn current(&self) -> Option<&'a T> { in current() method
468 if self.current.is_null() { in current()
471 unsafe { Some(&(*self.current).element) } in current()
478 if self.current.is_null() { in current_node()
481 unsafe { Some(&*(self.current)) } in current_node()
488 self.current in current_node_ptr()
494 current: *const Node<T>, field
502 if self.current.is_null() { in index()
511 if self.current.is_null() { in move_next()
512 self.current = self.list.head; in move_next()
515 self.current = unsafe { (*self.current).next }; in move_next()
524 if self.current.is_null() { in move_prev()
525 self.current = self.list.tail; in move_prev()
528 self.current = unsafe { (*self.current).prev }; in move_prev()
536 pub(crate) fn current(&mut self) -> Option<&mut T> { in current() method
537 if self.current.is_null() { in current()
540 unsafe { Some(&mut (*(self.current as *mut Node<T>)).element) } in current()
547 if self.current.is_null() { in current_node()
551 let node = &mut *(self.current as *mut Node<T>); in current_node()
561 if self.current.is_null() { in remove_current()
565 let unlinked_node = self.current; in remove_current()
567 self.current = (*unlinked_node).next; in remove_current()
805 assert_eq!(cursor.current(), Some(&1)); in ut_cursor_move_next()
808 assert_eq!(cursor.current(), Some(&2)); in ut_cursor_move_next()
811 assert_eq!(cursor.current(), None); in ut_cursor_move_next()
814 assert_eq!(cursor.current(), Some(&1)); in ut_cursor_move_next()
834 assert_eq!(cursor.current(), Some(&1)); in ut_cursor_move_prev()
837 assert_eq!(cursor.current(), None); in ut_cursor_move_prev()
840 assert_eq!(cursor.current(), Some(&2)); in ut_cursor_move_prev()
843 assert_eq!(cursor.current(), Some(&1)); in ut_cursor_move_prev()
953 assert_eq!(cursor.current(), Some(&mut 1)); in ut_cursor_mut_current()
956 assert_eq!(cursor.current(), None); in ut_cursor_mut_current()