diff options
| author | Tobias Decking <Tobias.Decking@gmail.com> | 2024-06-29 15:08:59 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-29 15:08:59 +0200 |
| commit | 5dece2b2bd97c56f9abe2599ec1b4957fd63be55 (patch) | |
| tree | f553c059985f7dad4174b1d82bf1f80fc06794d8 | |
| parent | be99243afc9e12d5abac1ba475808fab6c28204b (diff) | |
| download | rust-5dece2b2bd97c56f9abe2599ec1b4957fd63be55.tar.gz rust-5dece2b2bd97c56f9abe2599ec1b4957fd63be55.zip | |
Remove uneccessary condition in `div_ceil`
| -rw-r--r-- | library/core/src/num/uint_macros.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/num/uint_macros.rs b/library/core/src/num/uint_macros.rs index cd74cece0d1..ad72c29758b 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 |
