From 134071938d7e92e20e2c072675758720541f9ca1 Mon Sep 17 00:00:00 2001 From: Andres Rios Tascon Date: Sat, 20 Apr 2024 15:14:33 -0400 Subject: [PATCH] chore: minor cleanup --- src/polynomial.rs | 2 +- src/semigroup/error.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/polynomial.rs b/src/polynomial.rs index d7f08fa..a70b442 100644 --- a/src/polynomial.rs +++ b/src/polynomial.rs @@ -122,7 +122,7 @@ where /// Find the minimum degree of the polynomial. pub fn min_degree(&self, poly_props: &PolynomialProperties) -> u32 { - if let Some(idx) = self.nonzero.iter().next() { + if let Some(idx) = self.nonzero.first() { return poly_props.semigroup.degrees[*idx as usize]; } poly_props.semigroup.max_degree + 1 diff --git a/src/semigroup/error.rs b/src/semigroup/error.rs index 4226f32..12eccbb 100644 --- a/src/semigroup/error.rs +++ b/src/semigroup/error.rs @@ -2,7 +2,7 @@ use core::fmt; -/// An error structure for non-positive degrees of non-identity elements. +/// An error structure for semigroup errors. #[derive(Debug, Clone, PartialEq)] pub enum SemigroupError { NonPositiveDegreeError,