We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
into_iter
drain
1 parent 9096e95 commit fbb7c97Copy full SHA for fbb7c97
src/payment_store.rs
@@ -83,9 +83,9 @@ impl<K: Deref> PaymentInfoStorage<K>
83
where
84
K::Target: KVStorePersister + KVStoreUnpersister,
85
{
86
- pub(crate) fn from_payments(mut payments: Vec<PaymentInfo>, persister: K) -> Self {
+ pub(crate) fn from_payments(payments: Vec<PaymentInfo>, persister: K) -> Self {
87
let payments = Mutex::new(HashMap::from_iter(
88
- payments.drain(..).map(|payment_info| (payment_info.payment_hash, payment_info)),
+ payments.into_iter().map(|payment_info| (payment_info.payment_hash, payment_info)),
89
));
90
Self { payments, persister }
91
}
0 commit comments