From 5dece2b2bd97c56f9abe2599ec1b4957fd63be55 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` --- library/core/src/num/uint_macros.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/src/num/uint_macros.rs b/library/core/src/num/uint_macros.rs index cd74cece0d12e..ad72c29758bd7 100644 --- a/library/core/src/num/uint_macros.rs +++ b/library/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