Skip to content

Commit cd96bae

Browse files
committed
fix: format adapter/lib.rs, remove unused code
1 parent ad20523 commit cd96bae

File tree

5 files changed

+2
-11
lines changed

5 files changed

+2
-11
lines changed

Cargo.lock

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

adapter/src/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ pub struct EthereumChannel {
6868

6969
impl From<&Channel> for EthereumChannel {
7070
fn from(channel: &Channel) -> Self {
71-
// let spec =
7271
let spec = serde_json::to_string(&channel.spec).expect("Failed to serialize channel spec");
7372

7473
let mut hash = Sha256::new();
@@ -155,7 +154,7 @@ impl EthereumChannel {
155154
}
156155

157156
pub fn to_solidity_tuple(&self) -> Vec<String> {
158-
let validators = format!("[ {} ]", self.validators.join(", "));
157+
let validators = format!("[{}]", self.validators.join(","));
159158
let spec = hex::encode(&self.spec);
160159

161160
vec![

primitives/Cargo.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,4 @@ rand = { version = "^0.6" }
3030
lazy_static = "1.4.0"
3131
merkletree = "0.10.0"
3232
tiny-keccak = "1.5"
33-
# Ethereum
34-
ethabi = "8.0.1"
33+

primitives/src/adapter.rs

-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
use futures::prelude::*;
21
use std::collections::HashMap;
3-
use std::pin::Pin;
4-
// use domain::validator::message::State;
52
use crate::channel_validator::ChannelValidator;
63
use crate::validator::ValidatorDesc;
74
use crate::{Channel, Config};
8-
//use crate::sanity::SanityChecker;
95
use std::error::Error;
106
use std::fmt;
117
use std::fmt::Debug;

primitives/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
use std::error;
44
use std::fmt;
55

6-
76
pub mod ad_unit;
87
pub mod adapter;
98
pub mod balances_map;
@@ -19,7 +18,6 @@ pub mod targeting_tag;
1918
pub mod util;
2019
pub mod validator;
2120

22-
// pub mod ethereum;
2321
//#[cfg(any(test, feature = "fixtures"))]
2422
//pub use util::tests as test_util;
2523
//

0 commit comments

Comments
 (0)