Skip to content

Commit

Permalink
style: Simplify numeric bindings in match arms
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-ferdinand committed Sep 22, 2024
1 parent 031927a commit 0b8d6d8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tasm-lib/src/list/higher_order/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ impl<const NUM_INPUT_LISTS: usize> BasicSnippet for ChainMap<NUM_INPUT_LISTS> {
};
let pop_input_lists = match NUM_INPUT_LISTS {
0 => triton_asm!(),
i if 0 < i && i <= 5 => triton_asm!(pop { i }),
i if 5 < i && i <= 10 => triton_asm!(pop 5 pop { i - 5 }),
i if 10 < i && i <= 15 => triton_asm!(pop 5 pop 5 pop { i - 10 }),
i @ 0..=5 => triton_asm!(pop { i }),
i @ 6..=10 => triton_asm!(pop 5 pop { i - 5 }),
i @ 11..=15 => triton_asm!(pop 5 pop 5 pop { i - 10 }),
_ => panic!("too many input lists"),
};

Expand Down

0 comments on commit 0b8d6d8

Please sign in to comment.