Skip to content

Commit

Permalink
fix: Add rustfmt skip rule at module level (scroll-tech#461)
Browse files Browse the repository at this point in the history
  • Loading branch information
CPerezz authored Apr 13, 2022
1 parent f96b07d commit fbc88cb
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions gadgets/src/is_zero.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,20 @@ pub struct IsZeroChip<F> {
config: IsZeroConfig<F>,
}

#[rustfmt::skip]
impl<F: FieldExt> IsZeroChip<F> {
#[rustfmt::skip]
/// Sets up the configuration of the chip by creating the required columns
/// and defining the constraints that take part when using `is_zero` gate.
///
/// Truth table of iz_zero gate:
/// +----+-------+-----------+-----------------------+---------------------------------+-------------------------------------+
/// | ok | value | value_inv | 1 - value ⋅ value_inv | value ⋅ (1 - value ⋅
/// value_inv) | value_inv ⋅ (1 - value ⋅ value_inv) |
/// | ok | value | value_inv | 1 - value ⋅ value_inv | value ⋅ (1 - value ⋅ value_inv) | value_inv ⋅ (1 - value ⋅ value_inv) |
/// +----+-------+-----------+-----------------------+---------------------------------+-------------------------------------+
/// | V | 0 | 0 | 1 | 0
/// | 0 | | | 0 | x | 1
/// | 0 | x |
/// | | x | 0 | 1 | x
/// | 0 | | V | x | 1/x | 0
/// | 0 | 0 |
/// | | x | y | 1 - xy | x(1 - xy)
/// | y(1 - xy) |
/// | V | 0 | 0 | 1 | 0 | 0 |
/// | | 0 | x | 1 | 0 | x |
/// | | x | 0 | 1 | x | 0 |
/// | V | x | 1/x | 0 | 0 | 0 |
/// | | x | y | 1 - xy | x(1 - xy) | y(1 - xy) |
/// +----+-------+-----------+-----------------------+---------------------------------+-------------------------------------+
pub fn configure(
meta: &mut ConstraintSystem<F>,
Expand Down

0 comments on commit fbc88cb

Please sign in to comment.