Skip to content

Commit

Permalink
fn small_memset: Remove the unused UP_TO == 64 case (#1314)
Browse files Browse the repository at this point in the history
It's never hit (I tried replacing the `*as_array(buf) = [val; 64]` arm
with a panic and the tests all passed). This makes sense because the
original C code only had `upto` values of 16 and 32.
  • Loading branch information
kkysen committed Jul 14, 2024
2 parents 02c90c6 + 2022b7c commit 6f9b213
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/ctx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ pub fn small_memset<T: Clone + Copy, const UP_TO: usize, const WITH_DEFAULT: boo
08 if UP_TO >= 08 => *as_array(buf) = [val; 08],
16 if UP_TO >= 16 => *as_array(buf) = [val; 16],
32 if UP_TO >= 32 => *as_array(buf) = [val; 32],
64 if UP_TO >= 64 => *as_array(buf) = [val; 64],
_ => {
if WITH_DEFAULT {
buf.fill(val)
Expand Down

0 comments on commit 6f9b213

Please sign in to comment.