mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 17:57:56 +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:
@@ -42,7 +42,7 @@ macro_rules! impl_codec_bitflags {
|
||||
impl Decode for $wrapper {
|
||||
fn decode<I: codec::Input>(
|
||||
input: &mut I,
|
||||
) -> sp_std::result::Result<Self, codec::Error> {
|
||||
) -> ::core::result::Result<Self, codec::Error> {
|
||||
let field = <$size>::decode(input)?;
|
||||
Ok(Self(BitFlags::from_bits(field as $size).map_err(|_| "invalid value")?))
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ pub mod v1 {
|
||||
}
|
||||
|
||||
/// A migration utility to update the storage version from v0 to v1 for the pallet.
|
||||
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();
|
||||
|
||||
Reference in New Issue
Block a user