mirror of
https://github.com/saymrwulf/risc0-curve25519-dalek-source.git
synced 2026-09-04 20:03:40 +00:00
Change debug_assert to assert in arrays_equal().
This commit is contained in:
parent
60692ce891
commit
1c4f283be4
1 changed files with 2 additions and 2 deletions
|
|
@ -96,7 +96,7 @@ pub fn byte_is_nonzero(b: u8) -> u8 {
|
|||
|
||||
/// Check equality of two arrays, `a` and `b`, in constant time.
|
||||
///
|
||||
/// There is a `debug_assert!` that the two arrays are of equal length. For
|
||||
/// There is an `assert!` that the two arrays are of equal length. For
|
||||
/// example, the following code will panic:
|
||||
///
|
||||
/// ```rust,ignore
|
||||
|
|
@ -142,7 +142,7 @@ pub fn byte_is_nonzero(b: u8) -> u8 {
|
|||
/// Returns `1u8` if `a == b` and `0u8` otherwise.
|
||||
#[inline(always)]
|
||||
pub fn arrays_equal(a: &[u8], b: &[u8]) -> u8 {
|
||||
debug_assert!(a.len() == b.len());
|
||||
assert_eq!(a.len(), b.len());
|
||||
|
||||
let mut x: u8 = 0;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue