File tree 1 file changed +1
-11
lines changed
1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -239,9 +239,6 @@ where
239
239
panic ! ( "`amount` of samples must be less than or equal to `length`" ) ;
240
240
}
241
241
if length > ( u32:: MAX as usize ) {
242
- #[ cfg( target_pointer_width = "32" ) ]
243
- unreachable ! ( ) ;
244
-
245
242
// We never want to use inplace here, but could use floyd's alg
246
243
// Lazy version: always use the cache alg.
247
244
#[ cfg( target_pointer_width = "64" ) ]
@@ -303,15 +300,8 @@ where
303
300
X : Into < f64 > ,
304
301
{
305
302
if length > ( u32:: MAX as usize ) {
306
- #[ cfg( target_pointer_width = "32" ) ]
307
- unreachable ! ( ) ;
308
-
309
303
#[ cfg( target_pointer_width = "64" ) ]
310
- {
311
- let amount = amount as u64 ;
312
- let length = length as u64 ;
313
- sample_efraimidis_spirakis ( rng, length, weight, amount)
314
- }
304
+ sample_efraimidis_spirakis ( rng, length as u64 , weight, amount as u64 )
315
305
} else {
316
306
assert ! ( amount <= u32 :: MAX as usize ) ;
317
307
let amount = amount as u32 ;
You can’t perform that action at this time.
0 commit comments