@@ -473,6 +473,7 @@ where
473473 ///
474474 /// # Example
475475 /// ```
476+ /// # #[cfg(feature = "std")] {
476477 /// # use priority_queue::DoublePriorityQueue;
477478 /// let mut pq = DoublePriorityQueue::new();
478479 ///
@@ -486,6 +487,7 @@ where
486487 ///
487488 /// assert_eq!(pq.peek_min(), Some((&"Bananas", &15)));
488489 /// assert_eq!(pq.into_vec(), vec!["Bananas"]);
490+ /// # }
489491 /// ```
490492 pub fn extract_if < F > ( & mut self , predicate : F ) -> ExtractIf < I , P , F , H >
491493 where
@@ -512,6 +514,7 @@ where
512514 ///
513515 /// # Example
514516 /// ```
517+ /// # #[cfg(feature = "std")] {
515518 /// # use priority_queue::DoublePriorityQueue;
516519 /// let mut pq = DoublePriorityQueue::new();
517520 ///
@@ -524,6 +527,7 @@ where
524527 /// }), None);
525528 ///
526529 /// assert_eq!(pq.pop_min(), Some(("Bananas", 10)));
530+ /// # }
527531 /// ```
528532 pub fn pop_min_if < F > ( & mut self , f : F ) -> Option < ( I , P ) >
529533 where
@@ -554,6 +558,7 @@ where
554558 ///
555559 /// # Example
556560 /// ```
561+ /// # #[cfg(feature = "std")] {
557562 /// # use priority_queue::DoublePriorityQueue;
558563 /// let mut pq = DoublePriorityQueue::new();
559564 /// pq.push("Apples", 5);
@@ -563,6 +568,7 @@ where
563568 /// false
564569 /// }), None);
565570 /// assert_eq!(pq.pop_max(), Some(("Apples", 5)));
571+ /// # }
566572 /// ```
567573 pub fn pop_max_if < F > ( & mut self , f : F ) -> Option < ( I , P ) >
568574 where
@@ -583,6 +589,7 @@ where
583589 ///
584590 /// # Example
585591 /// ```
592+ /// # #[cfg(feature = "std")] {
586593 /// # use priority_queue::DoublePriorityQueue;
587594 /// let mut pq = DoublePriorityQueue::new();
588595 /// assert_eq!(pq.push("Apples", 5), None);
@@ -591,6 +598,7 @@ where
591598 /// assert_eq!(pq.get_priority("Apples"), Some(&6));
592599 /// assert_eq!(pq.push("Apples", 4), Some(6));
593600 /// assert_eq!(pq.get_priority("Apples"), Some(&4));
601+ /// # }
594602 /// ```
595603 ///
596604 /// Computes in **O(log(N))** time.
@@ -641,6 +649,7 @@ where
641649 ///
642650 /// # Example
643651 /// ```
652+ /// # #[cfg(feature = "std")] {
644653 /// # use priority_queue::DoublePriorityQueue;
645654 /// let mut pq = DoublePriorityQueue::new();
646655 /// assert_eq!(pq.push_increase("Apples", 5), None);
@@ -651,6 +660,7 @@ where
651660 /// // priority is returned.
652661 /// assert_eq!(pq.push_increase("Apples", 4), Some(4));
653662 /// assert_eq!(pq.get_priority("Apples"), Some(&6));
663+ /// # }
654664 /// ```
655665 ///
656666 /// Computes in **O(log(N))** time.
@@ -679,6 +689,7 @@ where
679689 ///
680690 /// # Example
681691 /// ```
692+ /// # #[cfg(feature = "std")] {
682693 /// # use priority_queue::DoublePriorityQueue;
683694 /// let mut pq = DoublePriorityQueue::new();
684695 /// assert_eq!(pq.push_decrease("Apples", 5), None);
@@ -689,6 +700,7 @@ where
689700 /// // priority is returned.
690701 /// assert_eq!(pq.push_decrease("Apples", 6), Some(6));
691702 /// assert_eq!(pq.get_priority("Apples"), Some(&4));
703+ /// # }
692704 /// ```
693705 ///
694706 /// Computes in **O(log(N))** time.
@@ -708,6 +720,7 @@ where
708720 ///
709721 /// # Example
710722 /// ```
723+ /// # #[cfg(feature = "std")] {
711724 /// # use priority_queue::DoublePriorityQueue;
712725 /// let mut pq = DoublePriorityQueue::new();
713726 /// assert_eq!(pq.change_priority("Apples", 5), None);
@@ -716,6 +729,7 @@ where
716729 /// assert_eq!(pq.get_priority("Apples"), Some(&6));
717730 /// assert_eq!(pq.change_priority("Apples", 4), Some(6));
718731 /// assert_eq!(pq.get_priority("Apples"), Some(&4));
732+ /// # }
719733 /// ```
720734 ///
721735 /// The item is found in **O(1)** thanks to the hash table.
0 commit comments