diff options
Diffstat (limited to 'src/block.rs')
-rw-r--r-- | src/block.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/block.rs b/src/block.rs index ce2d22c..3425242 100644 --- a/src/block.rs +++ b/src/block.rs @@ -61,7 +61,7 @@ impl Block { Block(value.into().to_be_bytes().into()) } - pub fn to_int(&self) -> u128 { + pub fn to_int(self) -> u128 { u128::from_be_bytes(self.0.into()) } @@ -226,7 +226,7 @@ impl Mul<u32> for Block { result } _ if rhs % 2 == 0 => self * 2 * (rhs / 2), - _ => self * (rhs - 1) ^ self, + _ => (self * (rhs - 1)) ^ self, } } } |