From a12c2979fb5f14fe07189cc5a476f65061797d46 Mon Sep 17 00:00:00 2001 From: Isis Lovecruft Date: Fri, 26 May 2017 20:53:18 +0000 Subject: [PATCH] Fix the doctest for byte_is_nonzero. --- src/subtle.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/subtle.rs b/src/subtle.rs index 098733f..d1f3241 100644 --- a/src/subtle.rs +++ b/src/subtle.rs @@ -69,12 +69,16 @@ pub fn bytes_equal_ct(a: u8, b: u8) -> u8 { /// Test if a byte is non-zero in constant time. /// -/// ```rust,ignore +/// ``` +/// # extern crate curve25519_dalek; +/// # use curve25519_dalek::subtle::byte_is_nonzero; +/// # fn main() { /// let mut x: u8; /// x = 0; -/// assert!(byte_is_nonzero(x)); +/// assert!(byte_is_nonzero(x) == 0); /// x = 3; /// assert!(byte_is_nonzero(x) == 1); +/// # } /// ``` /// /// # Return