Skip to content

Commit fbb7c97

Browse files
committed
f into_iter, not drain
1 parent 9096e95 commit fbb7c97

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/payment_store.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ impl<K: Deref> PaymentInfoStorage<K>
8383
where
8484
K::Target: KVStorePersister + KVStoreUnpersister,
8585
{
86-
pub(crate) fn from_payments(mut payments: Vec<PaymentInfo>, persister: K) -> Self {
86+
pub(crate) fn from_payments(payments: Vec<PaymentInfo>, persister: K) -> Self {
8787
let payments = Mutex::new(HashMap::from_iter(
88-
payments.drain(..).map(|payment_info| (payment_info.payment_hash, payment_info)),
88+
payments.into_iter().map(|payment_info| (payment_info.payment_hash, payment_info)),
8989
));
9090
Self { payments, persister }
9191
}

0 commit comments

Comments
 (0)