Lines Matching defs:pop
2553 while let Some(elem) = bheap.pop() {
5866 assert_eq!(data.pop().unwrap(), '?'); // 4 bytes
5867 assert_eq!(data.pop().unwrap(), '€'); // 3 bytes
5868 assert_eq!(data.pop().unwrap(), '¢'); // 2 bytes
5869 assert_eq!(data.pop().unwrap(), 'b'); // 1 bytes
5870 assert_eq!(data.pop().unwrap(), '华');
6953 assert_eq!(v.pop(), Some(()));
6954 assert_eq!(v.pop(), Some(()));
6955 assert_eq!(v.pop(), None);
8218 v.pop().unwrap();
9484 let e = v.pop();
9487 let f = v.pop();
9489 let g = v.pop();
11798 // shift values 1 step to the right by pop, sub one, push
11817 // shift values 1 step to the right by pop, sub one, push
12184 // doesn't pop more values than are pushed
13415 assert_eq!(heap.pop().unwrap(), sorted.pop().unwrap());
13439 assert_eq!(PeekMut::pop(top), 8);
13530 assert!(heap.pop().is_none());
13552 assert_eq!(q.pop().unwrap(), x);
17321 /// assert_eq!(s.pop(), Some('o'));
17322 /// assert_eq!(s.pop(), Some('o'));
17323 /// assert_eq!(s.pop(), Some('f'));
17325 /// assert_eq!(s.pop(), None);
17329 pub fn pop(&mut self) -> Option<char> {
28983 v.pop();
35040 while let Some((factor, dormant_r)) = stack.pop() {
37739 /// a root node that is internal, which the caller should pop from the map
44339 //! while let Some(State { cost, position }) = heap.pop() {
44466 /// // If we instead pop these scores, they should come back in order.
44467 /// assert_eq!(heap.pop(), Some(5));
44468 /// assert_eq!(heap.pop(), Some(2));
44469 /// assert_eq!(heap.pop(), Some(1));
44470 /// assert_eq!(heap.pop(), None);
44482 /// make `BinaryHeap` a min-heap. This makes `heap.pop()` return the smallest
44496 /// // If we pop these scores now, they should come back in the reverse order.
44497 /// assert_eq!(heap.pop(), Some(Reverse(1)));
44498 /// assert_eq!(heap.pop(), Some(Reverse(2)));
44499 /// assert_eq!(heap.pop(), Some(Reverse(5)));
44500 /// assert_eq!(heap.pop(), None);
44505 /// | [push] | [pop] | [peek]/[peek\_mut] |
44513 /// [pop]: BinaryHeap::pop
44575 pub fn pop(mut this: PeekMut<'a, T>) -> T {
44576 let value = this.heap.pop().unwrap();
44690 /// assert_eq!(heap.pop(), Some(3));
44691 /// assert_eq!(heap.pop(), Some(1));
44692 /// assert_eq!(heap.pop(), None);
44697 /// The worst case cost of `pop` on a heap containing *n* elements is *O*(log(*n*)).
44699 pub fn pop(&mut self) -> Option<T> {
44700 self.data.pop().map(|mut item| {
45601 self.inner.pop()
45685 while self.0.inner.pop().is_some() {}
45689 while let Some(item) = self.inner.pop() {
45703 self.inner.pop()
46813 //! `O(1)` pop (from the end).
46849 //! let two = v.pop();
46949 /// assert_eq!(vec.pop(), Some(2));
46997 /// while let Some(top) = stack.pop() {
48460 /// assert_eq!(vec.pop(), Some(3));
48465 pub fn pop(&mut self) -> Option<T> {