We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a21ffcf commit e5fa9ccCopy full SHA for e5fa9cc
src/libcore/num/mod.rs
@@ -506,7 +506,7 @@ macro_rules! int_impl {
506
#[inline]
507
pub fn abs(self) -> $T {
508
if self.is_negative() {
509
- self.wrapping_neg()
+ -self
510
} else {
511
self
512
}
src/libserialize/json.rs
@@ -1538,7 +1538,7 @@ impl<T: Iterator<Item=char>> Parser<T> {
1538
F64Value(res)
1539
1540
if neg {
1541
- let res = (res as i64).wrapping_neg();
+ let res = -(res as i64);
1542
1543
// Make sure we didn't underflow.
1544
if res > 0 {
0 commit comments