Skip to content

Commit c3d9276

Browse files
committed
f - fix lint warnings
1 parent 07cc90a commit c3d9276

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lightning/src/ln/channel.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2352,25 +2352,27 @@ impl FundingScope {
23522352
}
23532353

23542354
// TODO: Remove once MSRV is at least 1.66
2355+
#[cfg(splicing)]
23552356
trait AddSigned {
23562357
fn checked_add_signed(self, rhs: i64) -> Option<u64>;
23572358
fn saturating_add_signed(self, rhs: i64) -> u64;
23582359
}
23592360

2361+
#[cfg(splicing)]
23602362
impl AddSigned for u64 {
23612363
fn checked_add_signed(self, rhs: i64) -> Option<u64> {
23622364
if rhs >= 0 {
23632365
self.checked_add(rhs as u64)
23642366
} else {
2365-
self.checked_sub(rhs.abs() as u64)
2367+
self.checked_sub(rhs.unsigned_abs())
23662368
}
23672369
}
23682370

23692371
fn saturating_add_signed(self, rhs: i64) -> u64 {
23702372
if rhs >= 0 {
23712373
self.saturating_add(rhs as u64)
23722374
} else {
2373-
self.saturating_sub(rhs.abs() as u64)
2375+
self.saturating_sub(rhs.unsigned_abs())
23742376
}
23752377
}
23762378
}

0 commit comments

Comments
 (0)