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
+6 -6
View File
@@ -255,7 +255,7 @@ mod slashing;
pub mod inflation;
use rstd::{prelude::*, result};
use sp_std::{prelude::*, result};
use codec::{HasCompact, Encode, Decode};
use support::{
decl_module, decl_event, decl_storage, ensure,
@@ -445,7 +445,7 @@ impl<AccountId, Balance> StakingLedger<AccountId, Balance> where
// don't leave a dust balance in the staking system.
if *target <= minimum_balance {
slash_from_target += *target;
*value += rstd::mem::replace(target, Zero::zero());
*value += sp_std::mem::replace(target, Zero::zero());
}
*total_remaining = total_remaining.saturating_sub(slash_from_target);
@@ -1304,7 +1304,7 @@ impl<T: Trait> Module<T> {
let points = CurrentEraPointsEarned::take();
let now = T::Time::now();
let previous_era_start = <CurrentEraStart<T>>::mutate(|v| {
rstd::mem::replace(v, now)
sp_std::mem::replace(v, now)
});
let era_duration = now - previous_era_start;
if !era_duration.is_zero() {
@@ -1641,7 +1641,7 @@ impl<T: Trait + authorship::Trait> authorship::EventHandler<T::AccountId, T::Blo
/// A `Convert` implementation that finds the stash of the given controller account,
/// if any.
pub struct StashOf<T>(rstd::marker::PhantomData<T>);
pub struct StashOf<T>(sp_std::marker::PhantomData<T>);
impl<T: Trait> Convert<T::AccountId, Option<T::AccountId>> for StashOf<T> {
fn convert(controller: T::AccountId) -> Option<T::AccountId> {
@@ -1651,7 +1651,7 @@ impl<T: Trait> Convert<T::AccountId, Option<T::AccountId>> for StashOf<T> {
/// A typed conversion from stash account ID to the current exposure of nominators
/// on that account.
pub struct ExposureOf<T>(rstd::marker::PhantomData<T>);
pub struct ExposureOf<T>(sp_std::marker::PhantomData<T>);
impl<T: Trait> Convert<T::AccountId, Option<Exposure<T::AccountId, BalanceOf<T>>>>
for ExposureOf<T>
@@ -1751,7 +1751,7 @@ impl <T: Trait> OnOffenceHandler<T::AccountId, session::historical::Identificati
/// Filter historical offences out and only allow those from the bonding period.
pub struct FilterHistoricalOffences<T, R> {
_inner: rstd::marker::PhantomData<(T, R)>,
_inner: sp_std::marker::PhantomData<(T, R)>,
}
impl<T, Reporter, Offender, R, O> ReportOffence<Reporter, Offender, O>
+1 -1
View File
@@ -26,7 +26,7 @@ pub const CURRENT_VERSION: VersionNumber = 1;
mod inner {
use crate::{Store, Module, Trait};
use support::{StorageLinkedMap, StorageValue};
use rstd::vec::Vec;
use sp_std::vec::Vec;
use super::{CURRENT_VERSION, VersionNumber};
// the minimum supported version of the migration logic.
+5 -5
View File
@@ -57,7 +57,7 @@ use support::{
StorageMap, StorageDoubleMap,
traits::{Currency, OnUnbalanced, Imbalance},
};
use rstd::vec::Vec;
use sp_std::vec::Vec;
use codec::{Encode, Decode};
/// The proportion of the slashing reward to be paid out on the first slashing detection.
@@ -133,7 +133,7 @@ impl SlashingSpans {
SlashingSpan { index, start, length: Some(length) }
});
rstd::iter::once(last).chain(prior)
sp_std::iter::once(last).chain(prior)
}
/// Yields the era index where the last (current) slashing span started.
@@ -161,7 +161,7 @@ impl SlashingSpans {
};
// readjust the ongoing span, if it started before the beginning of the window.
self.last_start = rstd::cmp::max(self.last_start, window_start);
self.last_start = sp_std::cmp::max(self.last_start, window_start);
pruned
}
}
@@ -419,7 +419,7 @@ struct InspectingSpans<'a, T: Trait + 'a> {
paid_out: &'a mut BalanceOf<T>,
slash_of: &'a mut BalanceOf<T>,
reward_proportion: Perbill,
_marker: rstd::marker::PhantomData<T>,
_marker: sp_std::marker::PhantomData<T>,
}
// fetches the slashing spans record for a stash account, initializing it if necessary.
@@ -444,7 +444,7 @@ fn fetch_spans<'a, T: Trait + 'a>(
slash_of,
paid_out,
reward_proportion,
_marker: rstd::marker::PhantomData,
_marker: sp_std::marker::PhantomData,
}
}