Merge pull request #651 from LNP-BP/fix/amount-sum-nostd

This commit is contained in:
Sanket Kanjalkar 2021-09-13 06:04:23 -07:00 committed by GitHub
commit 9710728d89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -523,7 +523,7 @@ impl FromStr for Amount {
}
}
impl ::std::iter::Sum for Amount {
impl ::core::iter::Sum for Amount {
fn sum<I: Iterator<Item=Self>>(iter: I) -> Self {
let sats: u64 = iter.map(|amt| amt.0).sum();
Amount::from_sat(sats)
@ -855,7 +855,7 @@ impl FromStr for SignedAmount {
}
}
impl ::std::iter::Sum for SignedAmount {
impl ::core::iter::Sum for SignedAmount {
fn sum<I: Iterator<Item=Self>>(iter: I) -> Self {
let sats: i64 = iter.map(|amt| amt.0).sum();
SignedAmount::from_sat(sats)