chore: avoid glob imports (#2722)

This commit is contained in:
Bernhard Schuster
2021-03-26 15:45:37 +01:00
committed by GitHub
parent 73b9247c10
commit 5b363358b8
5 changed files with 22 additions and 9 deletions
@@ -14,7 +14,13 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with Parity Bridges Common. If not, see <http://www.gnu.org/licenses/>. // along with Parity Bridges Common. If not, see <http://www.gnu.org/licenses/>.
use super::*; use super::{
BridgeStorage,
RawOrigin,
HeadersByNumber,
Instance,
Config,
};
use crate::test_utils::{ use crate::test_utils::{
build_custom_header, build_genesis_header, insert_header, validator_utils::*, validators_change_receipt, build_custom_header, build_genesis_header, insert_header, validator_utils::*, validators_change_receipt,
@@ -42,7 +42,7 @@ use std::fmt::Debug;
use std::{collections::HashSet, time::Duration}; use std::{collections::HashSet, time::Duration};
pub mod consts { pub mod consts {
use super::*; use super::Duration;
/// Interval at which we check new Ethereum blocks. /// Interval at which we check new Ethereum blocks.
pub const ETHEREUM_TICK_INTERVAL: Duration = Duration::from_secs(5); pub const ETHEREUM_TICK_INTERVAL: Duration = Duration::from_secs(5);
+7 -1
View File
@@ -16,7 +16,13 @@
//! Metered variant of bounded mpsc channels to be able to extract metrics. //! Metered variant of bounded mpsc channels to be able to extract metrics.
use super::*; use futures::{channel::mpsc, task::Poll, task::Context, sink::SinkExt, stream::Stream};
use std::result;
use std::pin::Pin;
use super::Meter;
/// Create a wrapped `mpsc::channel` pair of `MeteredSender` and `MeteredReceiver`. /// Create a wrapped `mpsc::channel` pair of `MeteredSender` and `MeteredReceiver`.
pub fn channel<T>(capacity: usize, name: &'static str) -> (MeteredSender<T>, MeteredReceiver<T>) { pub fn channel<T>(capacity: usize, name: &'static str) -> (MeteredSender<T>, MeteredReceiver<T>) {
-5
View File
@@ -17,12 +17,7 @@
//! Metered variant of mpsc channels to be able to extract metrics. //! Metered variant of mpsc channels to be able to extract metrics.
use std::sync::atomic::{AtomicUsize, Ordering}; use std::sync::atomic::{AtomicUsize, Ordering};
use futures::{channel::mpsc, task::Poll, task::Context, sink::SinkExt, stream::Stream};
use std::result;
use std::sync::Arc; use std::sync::Arc;
use std::pin::Pin;
use derive_more::{Add, Display}; use derive_more::{Add, Display};
@@ -16,7 +16,13 @@
//! Metered variant of unbounded mpsc channels to be able to extract metrics. //! Metered variant of unbounded mpsc channels to be able to extract metrics.
use super::*; use futures::{channel::mpsc, task::Poll, task::Context, sink::SinkExt, stream::Stream};
use std::result;
use std::pin::Pin;
use super::Meter;
/// Create a wrapped `mpsc::channel` pair of `MeteredSender` and `MeteredReceiver`. /// Create a wrapped `mpsc::channel` pair of `MeteredSender` and `MeteredReceiver`.
pub fn unbounded<T>(name: &'static str) -> (UnboundedMeteredSender<T>, UnboundedMeteredReceiver<T>) { pub fn unbounded<T>(name: &'static str) -> (UnboundedMeteredSender<T>, UnboundedMeteredReceiver<T>) {