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
+1 -1
View File
@@ -33,7 +33,7 @@
#![cfg_attr(not(feature = "std"), no_std)]
use rstd::{prelude::*, collections::btree_map::BTreeMap};
use sp_std::{prelude::*, collections::btree_map::BTreeMap};
use sp_runtime::RuntimeDebug;
use sp_runtime::{helpers_128bit::multiply_by_rational, Perbill, Rational128};
use sp_runtime::traits::{Zero, Convert, Member, SimpleArithmetic, Saturating, Bounded};
+5 -5
View File
@@ -23,7 +23,7 @@ use sp_runtime::{
assert_eq_error_rate, Perbill,
traits::{Convert, Member, SaturatedConversion}
};
use rstd::collections::btree_map::BTreeMap;
use sp_std::collections::btree_map::BTreeMap;
pub(crate) struct TestCurrencyToVote;
impl Convert<Balance, u64> for TestCurrencyToVote {
@@ -149,7 +149,7 @@ pub(crate) fn elect_float<A, FS>(
if let Some(winner) = candidates
.iter_mut()
.filter(|c| !c.elected)
.min_by(|x, y| x.score.partial_cmp(&y.score).unwrap_or(rstd::cmp::Ordering::Equal))
.min_by(|x, y| x.score.partial_cmp(&y.score).unwrap_or(sp_std::cmp::Ordering::Equal))
{
winner.elected = true;
for n in &mut voters {
@@ -250,10 +250,10 @@ pub(crate) fn do_equalize_float<A>(
if backing_backed_stake.len() > 0 {
let max_stake = backing_backed_stake
.iter()
.max_by(|x, y| x.partial_cmp(&y).unwrap_or(rstd::cmp::Ordering::Equal))
.max_by(|x, y| x.partial_cmp(&y).unwrap_or(sp_std::cmp::Ordering::Equal))
.expect("vector with positive length will have a max; qed");
let min_stake = backed_stakes_iter
.min_by(|x, y| x.partial_cmp(&y).unwrap_or(rstd::cmp::Ordering::Equal))
.min_by(|x, y| x.partial_cmp(&y).unwrap_or(sp_std::cmp::Ordering::Equal))
.expect("iterator with positive length will have a min; qed");
difference = max_stake - min_stake;
@@ -277,7 +277,7 @@ pub(crate) fn do_equalize_float<A>(
elected_edges.sort_unstable_by(|x, y|
support_map.get(&x.0)
.and_then(|x| support_map.get(&y.0).and_then(|y| x.total.partial_cmp(&y.total)))
.unwrap_or(rstd::cmp::Ordering::Equal)
.unwrap_or(sp_std::cmp::Ordering::Equal)
);
let mut cumulative_stake = 0.0;