mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 18:07:58 +00:00
sp-std -> core (#3199)
First in a series of PRs that reduces our use of sp-std with a view to deprecating it. This is just looking at /substrate and moving some of the references from `sp-std` to `core`. These particular changes should be uncontroversial. Where macros are used `::core` should be used to remove any ambiguity. part of https://github.com/paritytech/polkadot-sdk/issues/2101
This commit is contained in:
@@ -38,7 +38,7 @@ impl<T: Config<I>, I: 'static> Drop for ExtraMutator<T, I> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Config<I>, I: 'static> sp_std::ops::Deref for ExtraMutator<T, I> {
|
||||
impl<T: Config<I>, I: 'static> core::ops::Deref for ExtraMutator<T, I> {
|
||||
type Target = T::Extra;
|
||||
fn deref(&self) -> &T::Extra {
|
||||
match self.pending {
|
||||
@@ -48,7 +48,7 @@ impl<T: Config<I>, I: 'static> sp_std::ops::Deref for ExtraMutator<T, I> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Config<I>, I: 'static> sp_std::ops::DerefMut for ExtraMutator<T, I> {
|
||||
impl<T: Config<I>, I: 'static> core::ops::DerefMut for ExtraMutator<T, I> {
|
||||
fn deref_mut(&mut self) -> &mut T::Extra {
|
||||
if self.pending.is_none() {
|
||||
self.pending = Some(self.original.clone());
|
||||
@@ -60,7 +60,7 @@ impl<T: Config<I>, I: 'static> sp_std::ops::DerefMut for ExtraMutator<T, I> {
|
||||
impl<T: Config<I>, I: 'static> ExtraMutator<T, I> {
|
||||
pub(super) fn maybe_new(
|
||||
id: T::AssetId,
|
||||
who: impl sp_std::borrow::Borrow<T::AccountId>,
|
||||
who: impl core::borrow::Borrow<T::AccountId>,
|
||||
) -> Option<ExtraMutator<T, I>> {
|
||||
if let Some(a) = Account::<T, I>::get(&id, who.borrow()) {
|
||||
Some(ExtraMutator::<T, I> {
|
||||
|
||||
@@ -64,7 +64,7 @@ pub mod v1 {
|
||||
}
|
||||
}
|
||||
|
||||
pub struct MigrateToV1<T>(sp_std::marker::PhantomData<T>);
|
||||
pub struct MigrateToV1<T>(core::marker::PhantomData<T>);
|
||||
impl<T: Config> OnRuntimeUpgrade for MigrateToV1<T> {
|
||||
fn on_runtime_upgrade() -> Weight {
|
||||
let current_version = Pallet::<T>::current_storage_version();
|
||||
|
||||
@@ -123,7 +123,7 @@ where
|
||||
return None
|
||||
}
|
||||
if let ExistenceReason::DepositHeld(deposit) =
|
||||
sp_std::mem::replace(self, ExistenceReason::DepositRefunded)
|
||||
core::mem::replace(self, ExistenceReason::DepositRefunded)
|
||||
{
|
||||
Some(deposit)
|
||||
} else {
|
||||
@@ -136,7 +136,7 @@ where
|
||||
return None
|
||||
}
|
||||
if let ExistenceReason::DepositFrom(depositor, deposit) =
|
||||
sp_std::mem::replace(self, ExistenceReason::DepositRefunded)
|
||||
core::mem::replace(self, ExistenceReason::DepositRefunded)
|
||||
{
|
||||
Some((depositor, deposit))
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user