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:
Weiliang Li
2019-12-10 16:26:27 +09:00
committed by Gavin Wood
parent 448dbc89a5
commit 6da9f59d72
210 changed files with 552 additions and 556 deletions
+2 -2
View File
@@ -13,7 +13,7 @@ wasmi-validation = { version = "0.3.0", default-features = false }
primitives = { package = "sp-core", path = "../../primitives/core", default-features = false }
sp-runtime = { path = "../../primitives/runtime", default-features = false }
runtime-io = { package = "sp-io", path = "../../primitives/sr-io", default-features = false }
rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false }
sp-std = { path = "../../primitives/std", default-features = false }
sandbox = { package = "sp-sandbox", path = "../../primitives/sr-sandbox", default-features = false }
support = { package = "frame-support", path = "../support", default-features = false }
system = { package = "frame-system", path = "../system", default-features = false }
@@ -34,7 +34,7 @@ std = [
"primitives/std",
"sp-runtime/std",
"runtime-io/std",
"rstd/std",
"sp-std/std",
"sandbox/std",
"support/std",
"system/std",
@@ -7,7 +7,7 @@ edition = "2018"
[dependencies]
sp-api = { path = "../../../../primitives/sr-api", default-features = false }
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }
rstd = { package = "sp-std", path = "../../../../primitives/sr-std", default-features = false }
sp-std = { path = "../../../../primitives/std", default-features = false }
sp-runtime = { path = "../../../../primitives/runtime", default-features = false }
[features]
@@ -15,6 +15,6 @@ default = ["std"]
std = [
"sp-api/std",
"codec/std",
"rstd/std",
"sp-std/std",
"sp-runtime/std",
]
@@ -22,7 +22,7 @@
#![cfg_attr(not(feature = "std"), no_std)]
use rstd::vec::Vec;
use sp_std::vec::Vec;
use codec::{Encode, Decode, Codec};
use sp_runtime::RuntimeDebug;
+3 -3
View File
@@ -21,9 +21,9 @@ use super::{
TrieIdGenerator,
};
use crate::exec::StorageKey;
use rstd::cell::RefCell;
use rstd::collections::btree_map::{BTreeMap, Entry};
use rstd::prelude::*;
use sp_std::cell::RefCell;
use sp_std::collections::btree_map::{BTreeMap, Entry};
use sp_std::prelude::*;
use runtime_io::hashing::blake2_256;
use sp_runtime::traits::{Bounded, Zero};
use support::traits::{Currency, Get, Imbalance, SignedImbalance, UpdateBalanceOutcome};
+1 -1
View File
@@ -20,7 +20,7 @@ use crate::account_db::{AccountDb, DirectAccountDb, OverlayAccountDb};
use crate::gas::{Gas, GasMeter, Token, approx_gas_for_balance};
use crate::rent;
use rstd::prelude::*;
use sp_std::prelude::*;
use sp_runtime::traits::{Bounded, CheckedAdd, CheckedSub, Zero};
use support::{
storage::unhashed,
+1 -1
View File
@@ -15,7 +15,7 @@
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
use crate::{GasSpent, Module, Trait, BalanceOf, NegativeImbalanceOf};
use rstd::convert::TryFrom;
use sp_std::convert::TryFrom;
use sp_runtime::traits::{
CheckedMul, Zero, SaturatedConversion, SimpleArithmetic, UniqueSaturatedInto,
};
+7 -7
View File
@@ -109,7 +109,7 @@ pub use crate::exec::{ExecResult, ExecReturnValue, ExecError, StatusCode};
#[cfg(feature = "std")]
use serde::{Serialize, Deserialize};
use primitives::crypto::UncheckedFrom;
use rstd::{prelude::*, marker::PhantomData, fmt::Debug};
use sp_std::{prelude::*, marker::PhantomData, fmt::Debug};
use codec::{Codec, Encode, Decode};
use runtime_io::hashing::blake2_256;
use sp_runtime::{
@@ -233,7 +233,7 @@ impl<H, Hasher> RawTombstoneContractInfo<H, Hasher>
where
H: Member + MaybeSerializeDeserialize+ Debug
+ AsRef<[u8]> + AsMut<[u8]> + Copy + Default
+ rstd::hash::Hash + Codec,
+ sp_std::hash::Hash + Codec,
Hasher: Hash<Output=H>,
{
fn new(storage_root: &[u8], code_hash: H) -> Self {
@@ -680,7 +680,7 @@ impl<T: Trait> Module<T> {
pub fn get_storage(
address: T::AccountId,
key: [u8; 32],
) -> rstd::result::Result<Option<Vec<u8>>, GetStorageError> {
) -> sp_std::result::Result<Option<Vec<u8>>, GetStorageError> {
let contract_info = <ContractInfoOf<T>>::get(&address)
.ok_or(GetStorageError::ContractDoesntExist)?
.get_alive()
@@ -1018,14 +1018,14 @@ impl<T: Trait + Send + Sync> Default for CheckBlockGasLimit<T> {
}
}
impl<T: Trait + Send + Sync> rstd::fmt::Debug for CheckBlockGasLimit<T> {
impl<T: Trait + Send + Sync> sp_std::fmt::Debug for CheckBlockGasLimit<T> {
#[cfg(feature = "std")]
fn fmt(&self, f: &mut rstd::fmt::Formatter) -> rstd::fmt::Result {
fn fmt(&self, f: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result {
write!(f, "CheckBlockGasLimit")
}
#[cfg(not(feature = "std"))]
fn fmt(&self, _: &mut rstd::fmt::Formatter) -> rstd::fmt::Result {
fn fmt(&self, _: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result {
Ok(())
}
}
@@ -1037,7 +1037,7 @@ impl<T: Trait + Send + Sync> SignedExtension for CheckBlockGasLimit<T> {
type DispatchInfo = DispatchInfo;
type Pre = ();
fn additional_signed(&self) -> rstd::result::Result<(), TransactionValidityError> { Ok(()) }
fn additional_signed(&self) -> sp_std::result::Result<(), TransactionValidityError> { Ok(()) }
fn validate(
&self,
@@ -29,7 +29,7 @@
use crate::gas::{Gas, GasMeter, Token};
use crate::wasm::{prepare, runtime::Env, PrefabWasmModule};
use crate::{CodeHash, CodeStorage, PristineCode, Schedule, Trait};
use rstd::prelude::*;
use sp_std::prelude::*;
use sp_runtime::traits::{Hash, Bounded};
use support::StorageMap;
+1 -1
View File
@@ -22,7 +22,7 @@ use crate::wasm::env_def::FunctionImplProvider;
use crate::exec::{Ext, ExecResult};
use crate::gas::GasMeter;
use rstd::prelude::*;
use sp_std::prelude::*;
use codec::{Encode, Decode};
use sandbox;
@@ -25,7 +25,7 @@ use crate::Schedule;
use parity_wasm::elements::{self, Internal, External, MemoryType, Type, ValueType};
use pwasm_utils;
use pwasm_utils::rules;
use rstd::prelude::*;
use sp_std::prelude::*;
use sp_runtime::traits::{SaturatedConversion};
struct ContractModule<'a> {
@@ -23,9 +23,9 @@ use crate::exec::{
use crate::gas::{Gas, GasMeter, Token, GasMeterResult, approx_gas_for_balance};
use sandbox;
use system;
use rstd::prelude::*;
use rstd::convert::TryInto;
use rstd::mem;
use sp_std::prelude::*;
use sp_std::convert::TryInto;
use sp_std::mem;
use codec::{Decode, Encode};
use sp_runtime::traits::{Bounded, SaturatedConversion};