Skip to content
Snippets Groups Projects
Unverified Commit 7d616be2 authored by bgallois's avatar bgallois
Browse files

fix unused_must_use

parent 15ab5bca
No related branches found
No related tags found
No related merge requests found
Pipeline #36103 passed
...@@ -555,7 +555,7 @@ pub mod pallet { ...@@ -555,7 +555,7 @@ pub mod pallet {
} }
Some(false) => { Some(false) => {
// negative result, slash and deposit event // negative result, slash and deposit event
T::Currency::slash_reserved( let _ = T::Currency::slash_reserved(
&requester, &requester,
<T as Config>::EvaluationPrice::get(), <T as Config>::EvaluationPrice::get(),
); );
......
...@@ -147,7 +147,7 @@ pub mod pallet { ...@@ -147,7 +147,7 @@ pub mod pallet {
Error::<T>::OneshotAccountAlreadyCreated Error::<T>::OneshotAccountAlreadyCreated
); );
<T::Currency as Currency<T::AccountId>>::withdraw( let _ = <T::Currency as Currency<T::AccountId>>::withdraw(
&transactor, &transactor,
value, value,
WithdrawReasons::TRANSFER, WithdrawReasons::TRANSFER,
...@@ -206,6 +206,7 @@ pub mod pallet { ...@@ -206,6 +206,7 @@ pub mod pallet {
creator: transactor.clone(), creator: transactor.clone(),
}); });
} else { } else {
let _ =
<T::Currency as Currency<T::AccountId>>::deposit_into_existing(&dest, value)?; <T::Currency as Currency<T::AccountId>>::deposit_into_existing(&dest, value)?;
} }
OneshotAccounts::<T>::remove(&transactor); OneshotAccounts::<T>::remove(&transactor);
...@@ -295,7 +296,9 @@ pub mod pallet { ...@@ -295,7 +296,9 @@ pub mod pallet {
creator: transactor.clone(), creator: transactor.clone(),
}); });
} else { } else {
<T::Currency as Currency<T::AccountId>>::deposit_into_existing(&dest2, balance2)?; let _ = <T::Currency as Currency<T::AccountId>>::deposit_into_existing(
&dest2, balance2,
)?;
} }
if dest1_is_oneshot { if dest1_is_oneshot {
OneshotAccounts::<T>::insert(&dest1, balance1); OneshotAccounts::<T>::insert(&dest1, balance1);
...@@ -305,7 +308,9 @@ pub mod pallet { ...@@ -305,7 +308,9 @@ pub mod pallet {
creator: transactor.clone(), creator: transactor.clone(),
}); });
} else { } else {
<T::Currency as Currency<T::AccountId>>::deposit_into_existing(&dest1, balance1)?; let _ = <T::Currency as Currency<T::AccountId>>::deposit_into_existing(
&dest1, balance1,
)?;
} }
OneshotAccounts::<T>::remove(&transactor); OneshotAccounts::<T>::remove(&transactor);
Self::deposit_event(Event::OneshotAccountConsumed { Self::deposit_event(Event::OneshotAccountConsumed {
......
...@@ -305,7 +305,7 @@ pub mod pallet { ...@@ -305,7 +305,7 @@ pub mod pallet {
core::num::NonZeroU16::new(current_ud_index) core::num::NonZeroU16::new(current_ud_index)
.expect("unrechable because current_ud_index is never zero."), .expect("unrechable because current_ud_index is never zero."),
); );
T::Currency::deposit_creating(who, uds_total); let _ = T::Currency::deposit_creating(who, uds_total);
Self::deposit_event(Event::UdsClaimed { Self::deposit_event(Event::UdsClaimed {
count: uds_count, count: uds_count,
total: uds_total, total: uds_total,
...@@ -443,7 +443,7 @@ pub mod pallet { ...@@ -443,7 +443,7 @@ pub mod pallet {
first_ud_index, first_ud_index,
PastReevals::<T>::get().into_iter(), PastReevals::<T>::get().into_iter(),
); );
T::Currency::deposit_creating(who, uds_total); let _ = T::Currency::deposit_creating(who, uds_total);
Self::deposit_event(Event::UdsAutoPaid { Self::deposit_event(Event::UdsAutoPaid {
count: uds_count, count: uds_count,
total: uds_total, total: uds_total,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment