Skip to content

Commit

Permalink
Fix rotate doc-test
Browse files Browse the repository at this point in the history
  • Loading branch information
Pratyush committed Jan 3, 2024
1 parent 6e8673d commit 439d55c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/uint/rotate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl<const N: usize, T: PrimUInt, ConstraintF: Field> UInt<N, T, ConstraintF> {
/// use ark_r1cs_std::prelude::*;
///
/// let cs = ConstraintSystem::<Fr>::new_ref();
/// let a = UInt32::new_witness(cs.clone(), || Ok(0xb301u32))?;
/// let mut a = UInt32::new_witness(cs.clone(), || Ok(0xb301u32))?;
/// let b = UInt32::new_witness(cs.clone(), || Ok(0x10000b3))?;
///
/// a.rotate_right_in_place(8);
Expand All @@ -46,7 +46,6 @@ impl<const N: usize, T: PrimUInt, ConstraintF: Field> UInt<N, T, ConstraintF> {
/// # Ok(())
/// # }
/// ```

#[tracing::instrument(target = "r1cs", skip(self))]
pub fn rotate_right_in_place(&mut self, by: usize) {
let by = by % N;
Expand Down Expand Up @@ -92,7 +91,7 @@ impl<const N: usize, T: PrimUInt, ConstraintF: Field> UInt<N, T, ConstraintF> {
/// use ark_r1cs_std::prelude::*;
///
/// let cs = ConstraintSystem::<Fr>::new_ref();
/// let a = UInt32::new_witness(cs.clone(), || Ok(0x10000b3))?;
/// let mut a = UInt32::new_witness(cs.clone(), || Ok(0x10000b3))?;
/// let b = UInt32::new_witness(cs.clone(), || Ok(0xb301u32))?;
///
/// a.rotate_left_in_place(8);
Expand Down

0 comments on commit 439d55c

Please sign in to comment.