remove unnessisary use statements due to 2021 core prelude (#4183)

Some traits are already included in the 2021 prelude and so shouldn't be
needed to use explicitly:

use `convert::TryFrom`, `convert::TryInto`, and `iter::FromIterator` are
removed.

( https://doc.rust-lang.org/core/prelude/rust_2021/ )

No breaking changes or change of functionality, so I think no PR doc is
needed in this case.

(Motivation: Removes some references to `sp-std`)
This commit is contained in:
Squirrel
2024-04-28 16:29:21 +01:00
committed by GitHub
parent 73b9a8391f
commit 954150f3b5
56 changed files with 46 additions and 82 deletions
@@ -38,7 +38,7 @@ use polkadot_node_subsystem::{
use polkadot_node_subsystem_util::{self as util, Validator};
use polkadot_primitives::{AvailabilityBitfield, CoreState, Hash, ValidatorIndex};
use sp_keystore::{Error as KeystoreError, KeystorePtr};
use std::{collections::HashMap, iter::FromIterator, time::Duration};
use std::{collections::HashMap, time::Duration};
use wasm_timer::{Delay, Instant};
mod metrics;
@@ -40,7 +40,7 @@ use sp_core::Pair as PairT;
use sp_keyring::Sr25519Keyring;
use sp_keystore::{testing::MemoryKeystore, Keystore, KeystorePtr};
use std::{iter::FromIterator as _, sync::Arc, time::Duration};
use std::{sync::Arc, time::Duration};
const TIMEOUT: Duration = Duration::from_millis(50);
macro_rules! launch {
@@ -16,7 +16,6 @@
use std::{
collections::{HashMap, HashSet},
convert::TryInto,
time::Duration,
};
@@ -20,9 +20,7 @@ use futures::{
use futures_timer::Delay;
use std::{
collections::{hash_map::Entry, HashMap, HashSet},
convert::TryInto,
future::Future,
iter::FromIterator,
time::{Duration, Instant},
};
use tokio_util::sync::CancellationToken;
@@ -55,7 +55,7 @@ use sp_application_crypto::{sr25519::Pair, AppCrypto, Pair as TraitPair};
use sp_authority_discovery::AuthorityPair;
use sp_keyring::Sr25519Keyring;
use sp_keystore::{Keystore, KeystorePtr};
use std::{iter::FromIterator as _, sync::Arc, time::Duration};
use std::{sync::Arc, time::Duration};
use util::reputation::add_reputation;
// Some deterministic genesis hash for protocol names
@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
use std::{collections::HashSet, convert::TryFrom};
use std::collections::HashSet;
pub use sc_network::ReputationChange;
pub use sc_network_types::PeerId;