diff options
Diffstat (limited to 'src/block.rs')
-rw-r--r-- | src/block.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/block.rs b/src/block.rs index 2b7907a..8d6517d 100644 --- a/src/block.rs +++ b/src/block.rs @@ -115,7 +115,7 @@ impl Block { /// Computes self * 2^exponent /// /// Ensures that there's no overflow in computing 2^exponent. - pub fn exp(&self, exponent: u32) -> Block { + pub fn exp(&self, exponent: usize) -> Block { match exponent { _ if exponent < 32 => *self * (1 << exponent), _ if exponent % 2 == 0 => self.exp(exponent / 2).exp(exponent / 2), @@ -266,9 +266,9 @@ impl IndexMut<usize> for Block { } } -impl Mul<u32> for Block { +impl Mul<usize> for Block { type Output = Block; - fn mul(self, rhs: u32) -> Block { + fn mul(self, rhs: usize) -> Block { match rhs { 0 => Block::null(), 1 => self, |