Removing overflow_div since it's not used
This commit is contained in:
parent
f1edd3d683
commit
cca4efb861
@ -107,8 +107,6 @@ pub trait CostType: ops::Mul<Output=Self> + ops::Div<Output=Self> + ops::Add<Out
|
||||
fn overflow_add(self, other: Self) -> (Self, bool);
|
||||
/// Multiple with overflow
|
||||
fn overflow_mul(self, other: Self) -> (Self, bool);
|
||||
/// Divide with overflow
|
||||
fn overflow_div(self, other: Self) -> (Self, bool);
|
||||
/// Single-step full multiplication and division: `self*other/div`
|
||||
/// Should not overflow on intermediate steps
|
||||
fn overflow_mul_div(self, other: Self, div: Self) -> (Self, bool);
|
||||
@ -135,10 +133,6 @@ impl CostType for U256 {
|
||||
Uint::overflowing_mul(self, other)
|
||||
}
|
||||
|
||||
fn overflow_div(self, other: Self) -> (Self, bool) {
|
||||
Uint::overflowing_div(self, other)
|
||||
}
|
||||
|
||||
fn overflow_mul_div(self, other: Self, div: Self) -> (Self, bool) {
|
||||
let x = self.full_mul(other);
|
||||
let (U512(parts), o) = Uint::overflowing_div(x, U512::from(div));
|
||||
@ -175,10 +169,6 @@ impl CostType for usize {
|
||||
self.overflowing_mul(other)
|
||||
}
|
||||
|
||||
fn overflow_div(self, other: Self) -> (Self, bool) {
|
||||
self.overflowing_div(other)
|
||||
}
|
||||
|
||||
fn overflow_mul_div(self, other: Self, div: Self) -> (Self, bool) {
|
||||
let (c, o) = U128::from(self).overflowing_mul(U128::from(other));
|
||||
let (U128(parts), o1) = c.overflowing_div(U128::from(div));
|
||||
|
Loading…
Reference in New Issue
Block a user