@@ -229,6 +229,45 @@ pub trait IndexedRandom: Index<usize> {
229
229
. into_iter ( ) ,
230
230
} )
231
231
}
232
+
233
+ /// Deprecated: use [`Self::sample`] instead
234
+ #[ cfg( feature = "alloc" ) ]
235
+ #[ deprecated( since = "0.9.2" , note = "Renamed to `sample`" ) ]
236
+ fn choose_multiple < R > ( & self , rng : & mut R , amount : usize ) -> SliceChooseIter < Self , Self :: Output >
237
+ where
238
+ Self :: Output : Sized ,
239
+ R : Rng + ?Sized ,
240
+ {
241
+ self . sample ( rng, amount)
242
+ }
243
+
244
+ /// Deprecated: use [`Self::sample_array`] instead
245
+ #[ deprecated( since = "0.9.2" , note = "Renamed to `sample_array`" ) ]
246
+ fn choose_multiple_array < R , const N : usize > ( & self , rng : & mut R ) -> Option < [ Self :: Output ; N ] >
247
+ where
248
+ Self :: Output : Clone + Sized ,
249
+ R : Rng + ?Sized ,
250
+ {
251
+ self . sample_array ( rng)
252
+ }
253
+
254
+ /// Deprecated: use [`Self::sample_weighted`] instead
255
+ #[ cfg( feature = "std" ) ]
256
+ #[ deprecated( since = "0.9.2" , note = "Renamed to `sample_weighted`" ) ]
257
+ fn choose_multiple_weighted < R , F , X > (
258
+ & self ,
259
+ rng : & mut R ,
260
+ amount : usize ,
261
+ weight : F ,
262
+ ) -> Result < SliceChooseIter < Self , Self :: Output > , WeightError >
263
+ where
264
+ Self :: Output : Sized ,
265
+ R : Rng + ?Sized ,
266
+ F : Fn ( & Self :: Output ) -> X ,
267
+ X : Into < f64 > ,
268
+ {
269
+ self . sample_weighted ( rng, amount, weight)
270
+ }
232
271
}
233
272
234
273
/// Extension trait on indexable lists, providing random sampling methods.
0 commit comments