core: Minor cleanup
This commit is contained in:
parent
fbb1c280bf
commit
104c64dc36
1 changed files with 1 additions and 1 deletions
|
|
@ -1765,7 +1765,7 @@ assert_eq!((-a).mod_euc(-b), 1);
|
|||
pub fn mod_euc(self, rhs: Self) -> Self {
|
||||
let r = self % rhs;
|
||||
if r < 0 {
|
||||
if rhs.is_negative() {
|
||||
if rhs < 0 {
|
||||
r - rhs
|
||||
} else {
|
||||
r + rhs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue