1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-09-15 11:36:16 +00:00

factor: enable a debug_assert! statement

This commit is contained in:
Daniel Hofstetter 2024-02-22 09:33:29 +01:00
parent 4dba45d1da
commit 4da633b835

View file

@ -31,14 +31,11 @@ pub(crate) trait Arithmetic: Copy + Sized {
// Check that r (reduced back to the usual representation) equals // Check that r (reduced back to the usual representation) equals
// a^b % n, unless the latter computation overflows // a^b % n, unless the latter computation overflows
// Temporarily commented-out, as there u64::checked_pow is not available debug_assert!(self
// on the minimum supported Rust version, nor is an appropriate method .to_u64(_a)
// for compiling the check conditionally. .checked_pow(_b as u32)
//debug_assert!(self .map(|r| r % self.modulus() == self.to_u64(result))
// .to_u64(_a) .unwrap_or(true));
// .checked_pow(_b as u32)
// .map(|r| r % self.modulus() == self.to_u64(result))
// .unwrap_or(true));
result result
} }