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,