Fixing no_std for Amount sum iterator
This commit is contained in:
parent
b2c8a7ebc1
commit
d20669522e
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue