File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -2352,25 +2352,27 @@ impl FundingScope {
2352
2352
}
2353
2353
2354
2354
// TODO: Remove once MSRV is at least 1.66
2355
+ #[cfg(splicing)]
2355
2356
trait AddSigned {
2356
2357
fn checked_add_signed(self, rhs: i64) -> Option<u64>;
2357
2358
fn saturating_add_signed(self, rhs: i64) -> u64;
2358
2359
}
2359
2360
2361
+ #[cfg(splicing)]
2360
2362
impl AddSigned for u64 {
2361
2363
fn checked_add_signed(self, rhs: i64) -> Option<u64> {
2362
2364
if rhs >= 0 {
2363
2365
self.checked_add(rhs as u64)
2364
2366
} else {
2365
- self.checked_sub(rhs.abs() as u64 )
2367
+ self.checked_sub(rhs.unsigned_abs() )
2366
2368
}
2367
2369
}
2368
2370
2369
2371
fn saturating_add_signed(self, rhs: i64) -> u64 {
2370
2372
if rhs >= 0 {
2371
2373
self.saturating_add(rhs as u64)
2372
2374
} else {
2373
- self.saturating_sub(rhs.abs() as u64 )
2375
+ self.saturating_sub(rhs.unsigned_abs() )
2374
2376
}
2375
2377
}
2376
2378
}
You can’t perform that action at this time.
0 commit comments