Tweaks to CrandallField::product

This commit is contained in:
Jakub Nabaglo 2021-09-08 16:04:31 -07:00
parent 3674ceb571
commit e50d79a347

View File

@ -431,8 +431,9 @@ impl MulAssign for CrandallField {
}
impl Product for CrandallField {
#[inline]
fn product<I: Iterator<Item = Self>>(iter: I) -> Self {
iter.fold(Self::ONE, |acc, x| acc * x)
iter.reduce(|acc, x| acc * x).unwrap_or(Self::ONE)
}
}