Lines Matching defs:max
2483 let mut max = heap.peek_mut().unwrap();
2486 if x < *max {
2487 *max = x;
12177 let max = if cfg!(miri) { 3 } else { 5 };
12182 for src_push_back in 0..max {
12183 for src_push_front in 0..max {
12194 for dst_push_back in 0..max {
12195 for dst_push_front in 0..max {
14847 let cap = cmp::max(self.cap * 2, required_cap);
14848 let cap = cmp::max(Self::MIN_NON_ZERO_CAP, cap);
30803 /// The simplest way is to use the range syntax `min..max`, thus `range(min..max)` will
30804 /// yield elements from min (inclusive) to max (exclusive).
30846 /// The simplest way is to use the range syntax `min..max`, thus `range(min..max)` will
30847 /// yield elements from min (inclusive) to max (exclusive).
31112 fn max(mut self) -> Option<(&'a K, &'a V)> {
31181 fn max(mut self) -> Option<(&'a K, &'a mut V)> {
31333 fn max(mut self) -> Option<&'a K> {
31526 fn max(mut self) -> Option<(&'a K, &'a V)> {
31591 fn max(mut self) -> Option<K> {
31686 fn max(mut self) -> Option<(&'a K, &'a mut V)> {
32172 use core::cmp::{max, min};
32415 /// The simplest way is to use the range syntax `min..max`, thus `range(min..max)` will
32416 /// yield elements from min (inclusive) to max (exclusive).
33470 fn max(mut self) -> Option<&'a T> {
33541 fn max(mut self) -> Option<&'a T> {
33736 (max(a_len, b_len), Some(a_len + b_len))
34316 assert_eq!(a.iter().max(), None);
34318 assert_eq!(a.range(..).max(), None);
34320 assert_eq!(a.difference(&BTreeSet::new()).max(), None);
34322 assert_eq!(a.intersection(&a).max(), None);
34324 assert_eq!(a.symmetric_difference(&BTreeSet::new()).max(), None);
34326 assert_eq!(a.union(&a).max(), None);
34330 assert_eq!(a.iter().max(), Some(&2));
34332 assert_eq!(a.range(..).max(), Some(&2));
34334 assert_eq!(a.difference(&BTreeSet::new()).max(), Some(&2));
34336 assert_eq!(a.intersection(&a).max(), Some(&2));
34338 assert_eq!(a.symmetric_difference(&BTreeSet::new()).max(), Some(&2));
34340 assert_eq!(a.union(&a).max(), Some(&2));
34994 let right = set.split_off(&(data.iter().max().unwrap() + 1));
36096 assert_eq!(a.iter().max(), None);
36098 assert_eq!(a.iter_mut().max(), None);
36100 assert_eq!(a.range(..).max(), None);
36102 assert_eq!(a.range_mut(..).max(), None);
36104 assert_eq!(a.keys().max(), None);
36106 assert_eq!(a.values().max(), None);
36108 assert_eq!(a.values_mut().max(), None);
36112 assert_eq!(a.iter().max(), Some((&2, &24)));
36114 assert_eq!(a.iter_mut().max(), Some((&2, &mut 24)));
36116 assert_eq!(a.range(..).max(), Some((&2, &24)));
36118 assert_eq!(a.range_mut(..).max(), Some((&2, &mut 24)));
36120 assert_eq!(a.keys().max(), Some(&2));
36122 assert_eq!(a.values().max(), Some(&42));
36124 assert_eq!(a.values_mut().max(), Some(&mut 42));
36287 let max = usize::MAX;
36288 let map: BTreeMap<_, _> = vec![(max, 0)].into_iter().collect();
36290 assert_eq!(map.range(max..=max).collect::<Vec<_>>(), &[(&max, &0)]);
36393 fn test(map: &BTreeMap<u32, u32>, size: u32, min: Bound<&u32>, max: Bound<&u32>) {
36394 let mut kvs = map.range((min, max)).map(|(&k, &v)| (k, v));
37548 let right = map.split_off(&(data.iter().max().unwrap().0 + 1));
40834 let cap = cmp::max(capacity + 1, MINIMUM_CAPACITY + 1).next_power_of_two();
41142 let target_cap = cmp::max(cmp::max(min_capacity, self.len()) + 1, MINIMUM_CAPACITY + 1)
43219 let min_cap = cmp::max(MINIMUM_CAPACITY, len) + 1;
43220 let cap = cmp::max(min_cap, other.capacity()).next_power_of_two();
44298 //! // instead of a max-heap.
44426 /// This will be a max-heap.
44610 /// Creates an empty `BinaryHeap` as a max-heap.
47745 self.buf.shrink_to_fit(cmp::max(self.len, min_capacity));