Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#128103 - folkertdev:unsigned-int-is-multiple-of, r=Amanieu add `is_multiple_of` for unsigned integer types tracking issue: rust-lang#128101 This adds the `.is_multiple_of` method on unsigned integers. Returns `true` if `self` is an integer multiple of `rhs`, and false otherwise. This function is equivalent to `self % rhs == 0`, except that it will not panic for `rhs == 0`. Instead, `0.is_multiple_of(0) == true`, and for any non-zero `n`, `n.is_multiple_of(0) == false`.
- Loading branch information