sp-npos-elections should not depend on itself (#6444)

This removes the `dev-dependency` onto `sp-npos-elections` from itself.
A crate should not depend on itself directly, especially not to make any
macros work.
This commit is contained in:
Bastian Köcher
2020-06-20 11:49:18 +02:00
committed by GitHub
parent 62ba0cc714
commit 1951962836
5 changed files with 19 additions and 19 deletions
@@ -17,8 +17,6 @@
//! Tests for npos-elections.
#![cfg(test)]
use crate::mock::*;
use crate::{
seq_phragmen, balance_solution, build_support_map, is_score_better, helpers::*,
@@ -772,10 +770,12 @@ fn score_comparison_large_value() {
mod compact {
use codec::{Decode, Encode};
use crate::{generate_compact_solution_type, VoteWeight};
use super::{AccountId};
use super::AccountId;
// these need to come from the same dev-dependency `sp-npos-elections`, not from the crate.
use sp_npos_elections::{Assignment, StakedAssignment, Error as PhragmenError, ExtendedBalance};
use crate::{
generate_compact_solution_type, VoteWeight, Assignment, StakedAssignment,
Error as PhragmenError, ExtendedBalance,
};
use sp_std::{convert::{TryInto, TryFrom}, fmt::Debug};
use sp_arithmetic::Percent;