Merge branch 'main' into dev

This commit is contained in:
An0nymous 2024-11-23 12:34:23 +01:00 committed by GitHub
commit 2e73125e14
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -311,6 +311,22 @@ impl Polynomial {
}
}
while !self.polynomial.is_empty()
&& self
.polynomial
.last()
.unwrap()
.as_ref()
.iter()
.all(|&x| x == 0)
{
self.polynomial.pop();
}
if self.is_empty() {
self = Polynomial::new(vec![FieldElement::new(vec![0; 16])]);
}
self
}
}