Skip to content

Commit ff0ec3a

Browse files
committed
chore: Make linter happy
1 parent 27a4325 commit ff0ec3a

File tree

5 files changed

+7
-20
lines changed

5 files changed

+7
-20
lines changed

bfieldcodec_derive/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ use syn::token::Comma;
7575
/// ```
7676
///
7777
/// - Enums with no variants are currently not supported. Consider using a unit struct instead.
78-
/// Example:
78+
/// Example:
7979
/// ```ignore
8080
/// #[derive(BFieldCodec)] // Currently not supported.
8181
/// enum Foo {} // Consider `struct Foo;` instead.

twenty-first/src/math/b_field_element.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,6 @@ impl TryFrom<&[u8]> for BFieldElement {
622622
}
623623

624624
impl Inverse for BFieldElement {
625-
#[must_use]
626625
#[inline]
627626
fn inverse(&self) -> Self {
628627
self.inverse()

twenty-first/src/math/digest.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -529,9 +529,6 @@ pub(crate) mod digest_tests {
529529
let bytes2: [u8; Digest::BYTES] = d1.into();
530530
let d2 = Digest::try_from(bytes2)?;
531531

532-
println!("bytes1: {:?}", bytes1);
533-
println!("bytes2: {:?}", bytes2);
534-
535532
assert_eq!(d1, d2);
536533
assert_eq!(bytes1, bytes2);
537534

@@ -658,15 +655,15 @@ pub(crate) mod digest_tests {
658655
#[test]
659656
fn serialize() -> Result<(), serde_json::Error> {
660657
for (digest, hex) in hex_examples() {
661-
assert_eq!(serde_json::to_string(&digest)?, format!("\"{}\"", hex));
658+
assert_eq!(serde_json::to_string(&digest)?, format!("\"{hex}\""));
662659
}
663660
Ok(())
664661
}
665662

666663
#[test]
667664
fn deserialize() -> Result<(), serde_json::Error> {
668665
for (digest, hex) in hex_examples() {
669-
let json_hex = format!("\"{}\"", hex);
666+
let json_hex = format!("\"{hex}\"");
670667
let digest_deserialized: Digest = serde_json::from_str::<Digest>(&json_hex)?;
671668
assert_eq!(digest_deserialized, digest);
672669
}

twenty-first/src/math/polynomial.rs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1713,7 +1713,7 @@ where
17131713
);
17141714

17151715
// add vectors of polynomials
1716-
let interpolants = left_interpolants
1716+
left_interpolants
17171717
.par_iter()
17181718
.zip(right_interpolants.par_iter())
17191719
.map(|(left_interpolant, right_interpolant)| {
@@ -1722,9 +1722,7 @@ where
17221722

17231723
left_term + right_term
17241724
})
1725-
.collect();
1726-
1727-
interpolants
1725+
.collect()
17281726
}
17291727

17301728
/// Evaluate the polynomial on a batch of points.
@@ -4148,8 +4146,7 @@ mod test_polynomials {
41484146

41494147
assert_eq!(
41504148
long_remainder, structured_remainder,
4151-
"naive: {}\nstructured: {}",
4152-
long_remainder, structured_remainder
4149+
"naive: {long_remainder}\nstructured: {structured_remainder}",
41534150
);
41544151
}
41554152

@@ -4202,8 +4199,7 @@ mod test_polynomials {
42024199

42034200
assert_eq!(
42044201
long_remainder, structured_remainder,
4205-
"full modulus: {}",
4206-
full_modulus
4202+
"full modulus: {full_modulus}",
42074203
);
42084204
}
42094205

@@ -4252,11 +4248,9 @@ mod test_polynomials {
42524248
fn reduce_long_division_and_fast_reduce_agree_simple_fixed() {
42534249
let roots = (0..10).map(BFieldElement::new).collect_vec();
42544250
let numerator = Polynomial::zerofier(&roots).formal_derivative();
4255-
println!("numerator: {}", numerator);
42564251

42574252
let divisor_roots = &roots[..roots.len() / 5];
42584253
let denominator = Polynomial::zerofier(divisor_roots);
4259-
println!("modulus: {}", denominator);
42604254

42614255
let (quotient, remainder) = numerator.divide(&denominator);
42624256
assert_eq!(
@@ -4265,11 +4259,9 @@ mod test_polynomials {
42654259
);
42664260

42674261
let long_div_remainder = numerator.reduce_long_division(&denominator);
4268-
println!("long div remainder: {}", long_div_remainder);
42694262
assert_eq!(remainder, long_div_remainder);
42704263

42714264
let preprocessed_remainder = numerator.fast_reduce(&denominator);
4272-
println!("fast remainder: {}", preprocessed_remainder);
42734265

42744266
assert_eq!(long_div_remainder, preprocessed_remainder);
42754267
}

twenty-first/src/math/x_field_element.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,6 @@ impl XFieldElement {
307307
}
308308

309309
impl Inverse for XFieldElement {
310-
#[must_use]
311310
fn inverse(&self) -> Self {
312311
self.inverse()
313312
}

0 commit comments

Comments
 (0)