Skip to content

Commit

Permalink
nightly fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Cesar199999 committed Nov 1, 2024
1 parent cfce6f4 commit 7efb7b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions arithmetic-circuits/src/arithmetic_circuit/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use ark_std::{
cmp::PartialEq,
collections::BTreeMap,
convert::From,
fmt::{Display, Formatter, Result},
format,
iter::{IntoIterator, Iterator},
option::{
Expand Down Expand Up @@ -592,9 +593,8 @@ impl<F: PrimeField> ArithmeticCircuit<F> {
}
}

#[cfg(feature = "std")]
impl<F: PrimeField> Display for Node<F> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
fn fmt(&self, f: &mut Formatter<'_>) -> Result {
match self {
Node::Variable(label) => write!(f, "{}", label),
Node::Constant(c) => write!(f, "Constant({})", c),
Expand All @@ -604,9 +604,8 @@ impl<F: PrimeField> Display for Node<F> {
}
}

#[cfg(feature = "std")]
impl<F: PrimeField> Display for ArithmeticCircuit<F> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
fn fmt(&self, f: &mut Formatter<'_>) -> Result {
writeln!(f, "Arithmetic circuit with {} nodes:", self.num_nodes())?;

for (index, node) in self.nodes.iter().enumerate() {
Expand Down
4 changes: 2 additions & 2 deletions arithmetic-circuits/src/expression/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use ark_std::{
clone::Clone,
collections::BTreeMap,
convert::{AsRef, From},
fmt::{Display, Formatter, Result},
iter::{FromIterator, IntoIterator, Iterator, Product, Sum},
ops::{Add, AddAssign, Mul, MulAssign, Neg, Sub, SubAssign},
option::Option::{None, Some},
Expand Down Expand Up @@ -299,9 +300,8 @@ impl<F: PrimeField> Product for Expression<F> {
}
}

#[cfg(feature = "std")]
impl<F: PrimeField> Display for Expression<F> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
fn fmt(&self, f: &mut Formatter<'_>) -> Result {
let hash = self.pointer();
match &*self.0 {
ExpressionInner::Variable(label) => write!(f, "Variable({})<{}>", label, hash),
Expand Down

0 comments on commit 7efb7b0

Please sign in to comment.