diff --git a/substrate/primitives/arithmetic/src/fixed64.rs b/substrate/primitives/arithmetic/src/fixed64.rs index 63a69e66e7..819982aa50 100644 --- a/substrate/primitives/arithmetic/src/fixed64.rs +++ b/substrate/primitives/arithmetic/src/fixed64.rs @@ -167,8 +167,7 @@ impl ops::Div for Fixed64 { fn div(self, rhs: Self) -> Self::Output { if rhs.0 == 0 { - let zero = 0; - return Fixed64::from_parts( self.0 / zero); + panic!("attempt to divide by zero"); } let (n, d) = if rhs.0 < 0 { (-self.0, rhs.0.abs() as u64)