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
+3 -3
View File
@@ -25,7 +25,7 @@
//! These roots and proofs of inclusion can be generated at any time during the current session.
//! Afterwards, the proofs can be fed to a consensus module when reporting misbehavior.
use rstd::prelude::*;
use sp_std::prelude::*;
use codec::{Encode, Decode};
use sp_runtime::KeyTypeId;
use sp_runtime::traits::{Convert, OpaqueKeys, Hash as HashT};
@@ -79,7 +79,7 @@ impl<T: Trait> Module<T> {
None => return, // nothing to prune.
};
let up_to = rstd::cmp::min(up_to, end);
let up_to = sp_std::cmp::min(up_to, end);
if up_to < start {
return // out of bounds. harmless.
@@ -108,7 +108,7 @@ pub trait OnSessionEnding<ValidatorId, FullIdentification>: crate::OnSessionEndi
/// An `OnSessionEnding` implementation that wraps an inner `I` and also
/// sets the historical trie root of the ending session.
pub struct NoteHistoricalRoot<T, I>(rstd::marker::PhantomData<(T, I)>);
pub struct NoteHistoricalRoot<T, I>(sp_std::marker::PhantomData<(T, I)>);
impl<T: Trait, I> crate::OnSessionEnding<T::ValidatorId> for NoteHistoricalRoot<T, I>
where I: OnSessionEnding<T::ValidatorId, T::FullIdentification>
+3 -3
View File
@@ -119,7 +119,7 @@
#![cfg_attr(not(feature = "std"), no_std)]
use rstd::{prelude::*, marker::PhantomData, ops::{Sub, Rem}};
use sp_std::{prelude::*, marker::PhantomData, ops::{Sub, Rem}};
use codec::Decode;
use sp_runtime::{KeyTypeId, Perbill, RuntimeAppPublic, BoundToRuntimeAppPublic};
use support::weights::SimpleDispatchInfo;
@@ -625,7 +625,7 @@ impl<T: Trait> Module<T> {
/// Returns `Ok(true)` if more than `DisabledValidatorsThreshold` validators in current
/// session is already disabled.
/// If used with the staking module it allows to force a new era in such case.
pub fn disable(c: &T::ValidatorId) -> rstd::result::Result<bool, ()> {
pub fn disable(c: &T::ValidatorId) -> sp_std::result::Result<bool, ()> {
Self::validators().iter().position(|i| i == c).map(Self::disable_index).ok_or(())
}
@@ -702,7 +702,7 @@ impl<T: Trait> OnFreeBalanceZero<T::ValidatorId> for Module<T> {
/// Wraps the author-scraping logic for consensus engines that can recover
/// the canonical index of an author. This then transforms it into the
/// registering account-ID of that session key index.
pub struct FindAccountFromAuthorIndex<T, Inner>(rstd::marker::PhantomData<(T, Inner)>);
pub struct FindAccountFromAuthorIndex<T, Inner>(sp_std::marker::PhantomData<(T, Inner)>);
impl<T: Trait, Inner: FindAuthor<u32>> FindAuthor<T::ValidatorId>
for FindAccountFromAuthorIndex<T, Inner>