Skip to content

Commit

Permalink
core: Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Daiki Mizukami committed Apr 23, 2018
1 parent fbb1c28 commit 104c64d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libcore/num/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 104c64d

Please sign in to comment.