mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-24 21:51:08 +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:
@@ -178,7 +178,7 @@ pub fn expand_outer_dispatch(
|
||||
type PostInfo = #scrate::dispatch::PostDispatchInfo;
|
||||
fn dispatch(self, origin: RuntimeOrigin) -> #scrate::dispatch::DispatchResultWithPostInfo {
|
||||
if !<Self::RuntimeOrigin as #scrate::traits::OriginTrait>::filter_call(&origin, &self) {
|
||||
return #scrate::__private::sp_std::result::Result::Err(
|
||||
return ::core::result::Result::Err(
|
||||
#system_path::Error::<#runtime>::CallFiltered.into()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -134,7 +134,6 @@ pub fn expand_outer_enum(
|
||||
enum_ty,
|
||||
));
|
||||
enum_conversions.extend(expand_enum_conversion(
|
||||
scrate,
|
||||
pallet_decl,
|
||||
&pallet_enum,
|
||||
&enum_name_ident,
|
||||
@@ -220,7 +219,6 @@ fn expand_enum_variant(
|
||||
}
|
||||
|
||||
fn expand_enum_conversion(
|
||||
scrate: &TokenStream,
|
||||
pallet: &Pallet,
|
||||
pallet_enum: &TokenStream,
|
||||
enum_name_ident: &Ident,
|
||||
@@ -247,7 +245,7 @@ fn expand_enum_conversion(
|
||||
impl TryInto<#pallet_enum> for #enum_name_ident {
|
||||
type Error = ();
|
||||
|
||||
fn try_into(self) -> #scrate::__private::sp_std::result::Result<#pallet_enum, Self::Error> {
|
||||
fn try_into(self) -> ::core::result::Result<#pallet_enum, Self::Error> {
|
||||
match self {
|
||||
Self::#variant_name(evt) => Ok(evt),
|
||||
_ => Err(()),
|
||||
|
||||
Reference in New Issue
Block a user