From d20669522e45ad217098e953205cee7ea85d92dd Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Mon, 13 Sep 2021 10:36:03 +0200 Subject: [PATCH] Fixing no_std for Amount sum iterator --- src/util/amount.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/amount.rs b/src/util/amount.rs index 427b67cc..92295ac9 100644 --- a/src/util/amount.rs +++ b/src/util/amount.rs @@ -523,7 +523,7 @@ impl FromStr for Amount { } } -impl ::std::iter::Sum for Amount { +impl ::core::iter::Sum for Amount { fn sum>(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>(iter: I) -> Self { let sats: i64 = iter.map(|amt| amt.0).sum(); SignedAmount::from_sat(sats)