Skip to content

Commit

Permalink
Review: remove unneeded cfgs
Browse files Browse the repository at this point in the history
  • Loading branch information
dhardy committed Aug 12, 2024
1 parent 01c3e1f commit e950543
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/seq/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,6 @@ where
panic!("`amount` of samples must be less than or equal to `length`");
}
if length > (u32::MAX as usize) {
#[cfg(target_pointer_width = "32")]
unreachable!();

// We never want to use inplace here, but could use floyd's alg
// Lazy version: always use the cache alg.
#[cfg(target_pointer_width = "64")]
Expand Down Expand Up @@ -303,15 +300,8 @@ where
X: Into<f64>,
{
if length > (u32::MAX as usize) {
#[cfg(target_pointer_width = "32")]
unreachable!();

#[cfg(target_pointer_width = "64")]
{
let amount = amount as u64;
let length = length as u64;
sample_efraimidis_spirakis(rng, length, weight, amount)
}
sample_efraimidis_spirakis(rng, length as u64, weight, amount as u64)
} else {
assert!(amount <= u32::MAX as usize);
let amount = amount as u32;
Expand Down

0 comments on commit e950543

Please sign in to comment.