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:
Squirrel
2024-02-06 13:01:29 +00:00
committed by GitHub
parent c552fb5495
commit bc2e5e1fe2
75 changed files with 125 additions and 125 deletions
@@ -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(()),