Fixing no_std for Amount sum iterator

This commit is contained in:
Dr Maxim Orlovsky 2021-09-13 10:36:03 +02:00
parent b2c8a7ebc1
commit d20669522e
No known key found for this signature in database
GPG Key ID: FFC0250947E5C6F7
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)