mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 03:31:05 +00:00
Remove useless imports (#11136)
Because `TryInto`/`TryFrom` are in prelude by default from edition 2021 Signed-off-by: koushiro <koushiro.cqx@gmail.com>
This commit is contained in:
@@ -21,7 +21,6 @@
|
||||
|
||||
use std::{
|
||||
collections::{HashMap, HashSet},
|
||||
convert::TryInto,
|
||||
hash::Hash,
|
||||
};
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
use crate::{mock::*, IndexAssignment, NposSolution};
|
||||
use frame_support::traits::ConstU32;
|
||||
use rand::SeedableRng;
|
||||
use std::convert::TryInto;
|
||||
|
||||
mod solution_type {
|
||||
use super::*;
|
||||
@@ -30,7 +29,7 @@ mod solution_type {
|
||||
// these need to come from the same dev-dependency `frame-election-provider-support`, not from
|
||||
// the crate.
|
||||
use crate::{generate_solution_type, Assignment, Error as NposError, NposSolution};
|
||||
use sp_std::{convert::TryInto, fmt::Debug};
|
||||
use sp_std::fmt::Debug;
|
||||
|
||||
#[allow(dead_code)]
|
||||
mod __private {
|
||||
|
||||
@@ -22,16 +22,12 @@ use codec::Encode;
|
||||
use scale_info::TypeInfo;
|
||||
use sp_arithmetic::traits::{Bounded, UniqueSaturatedInto};
|
||||
use sp_npos_elections::{ElectionScore, Error, EvaluateSupport};
|
||||
use sp_std::{
|
||||
convert::{TryFrom, TryInto},
|
||||
fmt::Debug,
|
||||
prelude::*,
|
||||
};
|
||||
use sp_std::{fmt::Debug, prelude::*};
|
||||
|
||||
/// An opaque index-based, NPoS solution type.
|
||||
pub trait NposSolution
|
||||
where
|
||||
Self: Sized + for<'a> sp_std::convert::TryFrom<&'a [IndexAssignmentOf<Self>], Error = Error>,
|
||||
Self: Sized + for<'a> TryFrom<&'a [IndexAssignmentOf<Self>], Error = Error>,
|
||||
{
|
||||
/// The maximum number of votes that are allowed.
|
||||
const LIMIT: usize;
|
||||
|
||||
Reference in New Issue
Block a user