mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 02:17:58 +00:00
Rename: primitives/sr-std -> primitives/sp-std (#4327)
* primitives/sr-std -> primitives/std * fix * fix conflict * rstd -> sp-std * git mv * fix review * fix merge
This commit is contained in:
@@ -86,8 +86,8 @@
|
||||
//! native::print!("My struct: {:?}", x);
|
||||
//! ```
|
||||
|
||||
use rstd::vec::Vec;
|
||||
use rstd::fmt::{self, Debug};
|
||||
use sp_std::vec::Vec;
|
||||
use sp_std::fmt::{self, Debug};
|
||||
|
||||
pub use log::{info, debug, error, trace, warn};
|
||||
pub use crate::runtime_print as print;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
//! Dispatch system. Contains a macro for defining runtime modules and
|
||||
//! generating values representing lazy module function calls.
|
||||
|
||||
pub use crate::rstd::{result, fmt, prelude::{Vec, Clone, Eq, PartialEq}, marker};
|
||||
pub use crate::sp_std::{result, fmt, prelude::{Vec, Clone, Eq, PartialEq}, marker};
|
||||
pub use crate::codec::{Codec, EncodeLike, Decode, Encode, Input, Output, HasCompact, EncodeAsRef};
|
||||
pub use frame_metadata::{
|
||||
FunctionMetadata, DecodeDifferent, DecodeDifferentArray, FunctionArgumentMetadata,
|
||||
@@ -865,7 +865,7 @@ macro_rules! decl_module {
|
||||
for $module<$trait_instance$(, $instance)?> where $( $other_where_bounds )*
|
||||
{
|
||||
fn on_initialize(_block_number_not_used: $trait_instance::BlockNumber) {
|
||||
use $crate::rstd::if_std;
|
||||
use $crate::sp_std::if_std;
|
||||
if_std! {
|
||||
use $crate::tracing;
|
||||
let span = tracing::span!(tracing::Level::DEBUG, "on_initialize");
|
||||
@@ -887,7 +887,7 @@ macro_rules! decl_module {
|
||||
for $module<$trait_instance$(, $instance)?> where $( $other_where_bounds )*
|
||||
{
|
||||
fn on_initialize($param: $param_ty) {
|
||||
use $crate::rstd::if_std;
|
||||
use $crate::sp_std::if_std;
|
||||
if_std! {
|
||||
use $crate::tracing;
|
||||
let span = tracing::span!(tracing::Level::DEBUG, "on_initialize");
|
||||
@@ -919,7 +919,7 @@ macro_rules! decl_module {
|
||||
for $module<$trait_instance$(, $instance)?> where $( $other_where_bounds )*
|
||||
{
|
||||
fn on_finalize(_block_number_not_used: $trait_instance::BlockNumber) {
|
||||
use $crate::rstd::if_std;
|
||||
use $crate::sp_std::if_std;
|
||||
if_std! {
|
||||
use $crate::tracing;
|
||||
let span = tracing::span!(tracing::Level::DEBUG, "on_finalize");
|
||||
@@ -941,7 +941,7 @@ macro_rules! decl_module {
|
||||
for $module<$trait_instance$(, $instance)?> where $( $other_where_bounds )*
|
||||
{
|
||||
fn on_finalize($param: $param_ty) {
|
||||
use $crate::rstd::if_std;
|
||||
use $crate::sp_std::if_std;
|
||||
if_std! {
|
||||
use $crate::tracing;
|
||||
let span = tracing::span!(tracing::Level::DEBUG, "on_finalize");
|
||||
@@ -1044,7 +1044,7 @@ macro_rules! decl_module {
|
||||
$vis fn $name(
|
||||
$origin: $origin_ty $(, $param: $param_ty )*
|
||||
) -> $crate::dispatch::DispatchResult<$error_type> {
|
||||
use $crate::rstd::if_std;
|
||||
use $crate::sp_std::if_std;
|
||||
if_std! {
|
||||
use $crate::tracing;
|
||||
let span = tracing::span!(tracing::Level::DEBUG, stringify!($name));
|
||||
@@ -1070,7 +1070,7 @@ macro_rules! decl_module {
|
||||
) => {
|
||||
$(#[doc = $doc_attr])*
|
||||
$vis fn $name($origin: $origin_ty $(, $param: $param_ty )* ) -> $result {
|
||||
use $crate::rstd::if_std;
|
||||
use $crate::sp_std::if_std;
|
||||
if_std! {
|
||||
use $crate::tracing;
|
||||
let span = tracing::span!(tracing::Level::DEBUG, stringify!($name));
|
||||
@@ -1193,7 +1193,7 @@ macro_rules! decl_module {
|
||||
{
|
||||
#[doc(hidden)]
|
||||
#[codec(skip)]
|
||||
__PhantomItem($crate::rstd::marker::PhantomData<($trait_instance $(, $instance)?)>, $crate::dispatch::Never),
|
||||
__PhantomItem($crate::sp_std::marker::PhantomData<($trait_instance $(, $instance)?)>, $crate::dispatch::Never),
|
||||
$( $generated_variants )*
|
||||
}
|
||||
};
|
||||
@@ -1231,7 +1231,7 @@ macro_rules! decl_module {
|
||||
pub struct $mod_type<
|
||||
$trait_instance: $trait_name
|
||||
$(<I>, $instance: $instantiable $( = $module_default_instance)?)?
|
||||
>($crate::rstd::marker::PhantomData<($trait_instance $(, $instance)?)>) where
|
||||
>($crate::sp_std::marker::PhantomData<($trait_instance $(, $instance)?)>) where
|
||||
$( $other_where_bounds )*;
|
||||
|
||||
$crate::decl_module! {
|
||||
|
||||
@@ -280,7 +280,7 @@ macro_rules! __decl_generic_event {
|
||||
$(
|
||||
#[doc(hidden)]
|
||||
#[codec(skip)]
|
||||
PhantomData($crate::rstd::marker::PhantomData<$instance>),
|
||||
PhantomData($crate::sp_std::marker::PhantomData<$instance>),
|
||||
)?
|
||||
}
|
||||
impl<$( $generic_param ),* $(, $instance)? > From<RawEvent<$( $generic_param ),* $(, $instance)?>> for () {
|
||||
@@ -486,12 +486,12 @@ macro_rules! impl_outer_event {
|
||||
$name::[< $module_name $(_ $generic_instance )? >](x)
|
||||
}
|
||||
}
|
||||
impl $crate::rstd::convert::TryInto<
|
||||
impl $crate::sp_std::convert::TryInto<
|
||||
$module_name::Event < $( $generic_param, )? $( $module_name::$generic_instance )? >
|
||||
> for $name {
|
||||
type Error = ();
|
||||
|
||||
fn try_into(self) -> $crate::rstd::result::Result<
|
||||
fn try_into(self) -> $crate::sp_std::result::Result<
|
||||
$module_name::Event < $( $generic_param, )? $( $module_name::$generic_instance )? >, Self::Error
|
||||
> {
|
||||
match self {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
//! Hash utilities.
|
||||
|
||||
use codec::Codec;
|
||||
use rstd::prelude::Vec;
|
||||
use sp_std::prelude::Vec;
|
||||
use runtime_io::hashing::{blake2_128, blake2_256, twox_64, twox_128, twox_256};
|
||||
|
||||
// This trait must be kept coherent with frame-support-procedural HasherKind usage
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#[doc(hidden)]
|
||||
pub use crate::rstd::vec::Vec;
|
||||
pub use crate::sp_std::vec::Vec;
|
||||
#[doc(hidden)]
|
||||
pub use crate::sp_runtime::traits::{Block as BlockT, Extrinsic};
|
||||
#[doc(hidden)]
|
||||
|
||||
@@ -29,7 +29,7 @@ pub extern crate tracing;
|
||||
#[cfg(feature = "std")]
|
||||
pub use serde;
|
||||
#[doc(hidden)]
|
||||
pub use rstd;
|
||||
pub use sp_std;
|
||||
#[doc(hidden)]
|
||||
pub use codec;
|
||||
#[cfg(feature = "std")]
|
||||
@@ -204,7 +204,7 @@ mod tests {
|
||||
DecodeDifferent, StorageEntryMetadata, StorageMetadata, StorageEntryType,
|
||||
StorageEntryModifier, DefaultByteGetter, StorageHasher,
|
||||
};
|
||||
use rstd::marker::PhantomData;
|
||||
use sp_std::marker::PhantomData;
|
||||
|
||||
pub trait Trait {
|
||||
type BlockNumber: Codec + EncodeLike + Default;
|
||||
|
||||
@@ -178,8 +178,8 @@ macro_rules! impl_outer_origin {
|
||||
$name::system(x)
|
||||
}
|
||||
}
|
||||
impl Into<$crate::rstd::result::Result<$system::Origin<$runtime>, $name>> for $name {
|
||||
fn into(self) -> $crate::rstd::result::Result<$system::Origin<$runtime>, Self> {
|
||||
impl Into<$crate::sp_std::result::Result<$system::Origin<$runtime>, $name>> for $name {
|
||||
fn into(self) -> $crate::sp_std::result::Result<$system::Origin<$runtime>, Self> {
|
||||
if let $name::system(l) = self {
|
||||
Ok(l)
|
||||
} else {
|
||||
@@ -200,12 +200,12 @@ macro_rules! impl_outer_origin {
|
||||
}
|
||||
}
|
||||
impl Into<
|
||||
$crate::rstd::result::Result<
|
||||
$crate::sp_std::result::Result<
|
||||
$module::Origin < $( $generic )? $(, $module::$generic_instance )? >,
|
||||
$name,
|
||||
>>
|
||||
for $name {
|
||||
fn into(self) -> $crate::rstd::result::Result<
|
||||
fn into(self) -> $crate::sp_std::result::Result<
|
||||
$module::Origin < $( $generic )? $(, $module::$generic_instance )? >,
|
||||
Self,
|
||||
> {
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
//! avoid collision from a resistant hash function (which unique implies)).
|
||||
// NOTE: could replace unhashed by having only one kind of storage (root being null storage key (storage_key can become Option<&[u8]>).
|
||||
|
||||
use crate::rstd::prelude::*;
|
||||
use crate::sp_std::prelude::*;
|
||||
use codec::{Codec, Encode, Decode};
|
||||
|
||||
/// Return the value of the item in storage under `key`, or `None` if there is no explicit entry.
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use rstd::prelude::*;
|
||||
use rstd::borrow::Borrow;
|
||||
use sp_std::prelude::*;
|
||||
use sp_std::borrow::Borrow;
|
||||
use codec::{Ref, FullCodec, FullEncode, Encode, EncodeLike, EncodeAppend};
|
||||
use crate::{storage::{self, unhashed}, hash::{StorageHasher, Twox128}, traits::Len};
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
use codec::{FullCodec, Encode, Decode, EncodeLike, Ref};
|
||||
use crate::{storage::{self, unhashed}, hash::{StorageHasher, Twox128}, traits::Len};
|
||||
use rstd::{prelude::*, marker::PhantomData};
|
||||
use sp_std::{prelude::*, marker::PhantomData};
|
||||
|
||||
/// Generator for `StorageLinkedMap` used by `decl_storage`.
|
||||
///
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
use rstd::prelude::*;
|
||||
use rstd::borrow::Borrow;
|
||||
use sp_std::prelude::*;
|
||||
use sp_std::borrow::Borrow;
|
||||
use codec::{FullCodec, FullEncode, Encode, EncodeLike, Ref, EncodeAppend};
|
||||
use crate::{storage::{self, unhashed}, hash::{StorageHasher, Twox128}, traits::Len};
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
use rstd::prelude::*;
|
||||
use sp_std::prelude::*;
|
||||
use codec::{FullCodec, Encode, EncodeAppend, EncodeLike, Decode};
|
||||
use crate::{storage::{self, unhashed}, hash::{Twox128, StorageHasher}, traits::Len};
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
//! Operation on runtime storage using hashed keys.
|
||||
|
||||
use super::unhashed;
|
||||
use rstd::prelude::*;
|
||||
use sp_std::prelude::*;
|
||||
use codec::{Encode, Decode};
|
||||
|
||||
/// Return the value of the item in storage under `key`, or `None` if there is no explicit entry.
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
//! Stuff to do with the runtime's storage.
|
||||
|
||||
use rstd::{prelude::*, marker::PhantomData};
|
||||
use sp_std::{prelude::*, marker::PhantomData};
|
||||
use codec::{FullCodec, FullEncode, Encode, EncodeAppend, EncodeLike, Decode};
|
||||
use crate::{traits::Len, hash::{Twox128, StorageHasher}};
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
//! Operation on unhashed runtime storage.
|
||||
|
||||
use rstd::prelude::*;
|
||||
use sp_std::prelude::*;
|
||||
use codec::{Encode, Decode};
|
||||
|
||||
/// Return the value of the item in storage under `key`, or `None` if there is no explicit entry.
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
//!
|
||||
//! NOTE: If you're looking for `parameter_types`, it has moved in to the top-level module.
|
||||
|
||||
use rstd::{prelude::*, result, marker::PhantomData, ops::Div, fmt::Debug};
|
||||
use sp_std::{prelude::*, result, marker::PhantomData, ops::Div, fmt::Debug};
|
||||
use codec::{FullCodec, Codec, Encode, Decode};
|
||||
use primitives::u32_trait::Value as U32;
|
||||
use sp_runtime::{
|
||||
@@ -777,4 +777,3 @@ pub trait ValidatorRegistration<ValidatorId> {
|
||||
/// module
|
||||
fn is_registered(id: &ValidatorId) -> bool;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user