MCPcopy Create free account
hub / github.com/RustCrypto/utils / ct_select_array

Method ct_select_array

ctutils/src/traits/ct_select.rs:69–73  ·  view source on GitHub ↗
(a: &[Self; N], b: &[Self; N], choice: Choice)

Source from the content-addressed store, hash-verified

67{
68 #[inline]
69 fn ct_select_array(a: &[Self; N], b: &[Self; N], choice: Choice) -> [Self; N] {
70 let mut ret = a.clone();
71 ret.ct_assign(b, choice);
72 ret
73 }
74}
75
76/// Marker trait which enables a blanket impl of [`CtSelect`] for types which also impl

Callers

nothing calls this directly

Calls 2

cloneMethod · 0.45
ct_assignMethod · 0.45

Tested by

no test coverage detected