From 50a66465304ca7cb64b5285e05d48e6b3d267825 Mon Sep 17 00:00:00 2001 From: Tobias Decking Date: Sat, 29 Jun 2024 15:08:59 +0200 Subject: [PATCH] Remove uneccessary condition in `div_ceil` --- core/src/num/uint_macros.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/num/uint_macros.rs b/core/src/num/uint_macros.rs index cd74cece0d12e..ad72c29758bd7 100644 --- a/core/src/num/uint_macros.rs +++ b/core/src/num/uint_macros.rs @@ -2726,7 +2726,7 @@ macro_rules! uint_impl { pub const fn div_ceil(self, rhs: Self) -> Self { let d = self / rhs; let r = self % rhs; - if r > 0 && rhs > 0 { + if r > 0 { d + 1 } else { d