Skip to content

Commit dcac2b3

Browse files
committed
clean up use statements
1 parent 9694de8 commit dcac2b3

File tree

5 files changed

+10
-17
lines changed

5 files changed

+10
-17
lines changed

primitives/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ pub use self::{
1111
balances_map::{BalancesMap, UnifiedMap},
1212
big_num::BigNum,
1313
campaign::{Campaign, CampaignId},
14-
channel::Channel,
15-
channel::ChannelId,
14+
channel::{Channel, ChannelId},
1615
config::Config,
1716
deposit::Deposit,
1817
event_submission::EventSubmission,

primitives/src/util/tests/prep_db.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ lazy_static! {
5353

5454
// Dummy adapter auth tokens
5555
// authorization tokens
56-
///
5756
pub static ref AUTH: HashMap<String, String> = {
5857
let mut auth = HashMap::new();
5958

sentry/src/db/event_aggregate.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ use chrono::{DateTime, Utc};
22
use futures::pin_mut;
33
use primitives::{
44
balances::UncheckedState,
5-
channel::Channel as ChannelV5,
65
sentry::{EventAggregate, MessageResponse},
76
validator::{ApproveState, Heartbeat, NewState},
8-
Address, BigNum, ChannelId, ValidatorId,
7+
Address, BigNum, Channel, ChannelId, ValidatorId,
98
};
109
use std::{convert::TryFrom, ops::Add};
1110
use tokio_postgres::{
@@ -17,7 +16,7 @@ use super::{DbPool, PoolError};
1716

1817
pub async fn latest_approve_state_v5(
1918
pool: &DbPool,
20-
channel: &ChannelV5,
19+
channel: &Channel,
2120
) -> Result<Option<MessageResponse<ApproveState>>, PoolError> {
2221
let client = pool.get().await?;
2322

@@ -34,7 +33,7 @@ pub async fn latest_approve_state_v5(
3433

3534
pub async fn latest_new_state_v5(
3635
pool: &DbPool,
37-
channel: &ChannelV5,
36+
channel: &Channel,
3837
state_root: &str,
3938
) -> Result<Option<MessageResponse<NewState<UncheckedState>>>, PoolError> {
4039
let client = pool.get().await?;

sentry/src/routes/event_aggregate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use chrono::{serde::ts_milliseconds_option, DateTime, Utc};
22
use hyper::{Body, Request, Response};
33
use serde::Deserialize;
44

5-
use primitives::{adapter::Adapter, channel::Channel, sentry::EventAggregateResponse};
5+
use primitives::{adapter::Adapter, sentry::EventAggregateResponse, Channel};
66

77
use crate::{success_response, Application, Auth, ResponseError};
88

validator_worker/src/main.rs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,17 @@ use std::{convert::TryFrom, error::Error, time::Duration};
55

66
use clap::{crate_version, App, Arg};
77
use futures::future::{join, join_all};
8-
use tokio::{
9-
runtime::Runtime,
10-
// time::{sleep, timeout},
11-
time::sleep,
12-
};
8+
use tokio::{runtime::Runtime, time::sleep};
139

1410
use adapter::{AdapterTypes, DummyAdapter, EthereumAdapter};
1511
use primitives::{
1612
adapter::{Adapter, DummyAdapterOptions, KeystoreOptions},
17-
// channel::Channel as ChannelV5,
1813
config::{configuration, Config},
19-
util::tests::prep_db::{AUTH, IDS},
20-
util::ApiUrl,
14+
util::{
15+
tests::prep_db::{AUTH, IDS},
16+
ApiUrl,
17+
},
2118
ValidatorId,
22-
// Campaign, ChannelId, SpecValidator,
2319
};
2420
use slog::{error, info, Logger};
2521
use std::fmt::Debug;

0 commit comments

Comments
 (0)