Lines Matching refs:choose
79 fn choose<R>(&self, rng: &mut R) -> Option<&Self::Item> in choose() method
304 fn choose<R>(mut self, rng: &mut R) -> Option<Self::Item> in choose() method
495 fn choose<R>(&self, rng: &mut R) -> Option<&Self::Item> in choose() method
684 let picked = *chars.choose(&mut r).unwrap(); in test_slice_choose()
700 assert_eq!(v.choose(&mut r), None); in test_slice_choose()
712 assert_eq!(chars.choose(&mut r), Some(&'l')); in value_stability_slice()
813 let picked = iter.clone().choose(r).unwrap(); in test_iterator_choose()
856 assert_eq!((0..0).choose(r), None); in test_iterator_choose()
857 assert_eq!(UnhintedIterator { iter: 0..0 }.choose(r), None); in test_iterator_choose()
910 assert_eq!((0..0).choose(r), None); in test_iterator_choose_stable()
911 assert_eq!(UnhintedIterator { iter: 0..0 }.choose(r), None); in test_iterator_choose_stable()
1118 fn choose<I: Iterator<Item = u32>>(iter: I) -> Option<u32> { in value_stability_choose() function
1120 iter.choose(&mut rng) in value_stability_choose()
1123 assert_eq!(choose([].iter().cloned()), None); in value_stability_choose()
1124 assert_eq!(choose(0..100), Some(33)); in value_stability_choose()
1125 assert_eq!(choose(UnhintedIterator { iter: 0..100 }), Some(40)); in value_stability_choose()
1127 choose(ChunkHintedIterator { in value_stability_choose()
1136 choose(ChunkHintedIterator { in value_stability_choose()
1145 choose(WindowHintedIterator { in value_stability_choose()
1153 choose(WindowHintedIterator { in value_stability_choose()
1164 fn choose<I: Iterator<Item = u32>>(iter: I) -> Option<u32> { in value_stability_choose_stable() function
1169 assert_eq!(choose([].iter().cloned()), None); in value_stability_choose_stable()
1170 assert_eq!(choose(0..100), Some(40)); in value_stability_choose_stable()
1171 assert_eq!(choose(UnhintedIterator { iter: 0..100 }), Some(40)); in value_stability_choose_stable()
1173 choose(ChunkHintedIterator { in value_stability_choose_stable()
1182 choose(ChunkHintedIterator { in value_stability_choose_stable()
1191 choose(WindowHintedIterator { in value_stability_choose_stable()
1199 choose(WindowHintedIterator { in value_stability_choose_stable()