Function
select_vartime
(a: &u8, b: &u8, choice: Choice)
Source from the content-addressed store, hash-verified
| 691 | // Don't actually use this! It's just a test function implemented in variable-time |
| 692 | #[allow(clippy::trivially_copy_pass_by_ref)] |
| 693 | const fn select_vartime(a: &u8, b: &u8, choice: Choice) -> u8 { |
| 694 | if choice.to_bool() { *b } else { *a } |
| 695 | } |
| 696 | |
| 697 | assert_eq!( |
| 698 | unwrap_or!(NONE, OTHER.unwrap(), select_vartime), |
Callers
nothing calls this directly
Tested by
no test coverage detected