factor::Factors::add: Make the precondition check a debug_assert

This commit is contained in:
nicoo 2020-05-30 11:32:55 +02:00
parent 33e18b4cd3
commit f84d0f9398

View file

@ -39,7 +39,7 @@ impl Factors {
}
fn add(&mut self, prime: u64, exp: u8) {
assert!(exp > 0);
debug_assert!(exp > 0);
let n = *self.f.get(&prime).unwrap_or(&0);
self.f.insert(prime, exp + n);
}