From 1c4f283be4d4d37bced6a8da7119cf4ab8bf0762 Mon Sep 17 00:00:00 2001 From: Isis Lovecruft Date: Sat, 27 May 2017 18:28:37 +0000 Subject: [PATCH] Change debug_assert to assert in arrays_equal(). --- src/subtle.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/subtle.rs b/src/subtle.rs index 1dd6ba4..93a6e52 100644 --- a/src/subtle.rs +++ b/src/subtle.rs @@ -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;