Skip to content

Commit

Permalink
style: fix fmt and clippy
Browse files Browse the repository at this point in the history
Signed-off-by: Gustavo Inacio <gustavo@semiotic.ai>
  • Loading branch information
gusinacio committed Mar 5, 2024
1 parent a992181 commit bc86d16
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 20 deletions.
25 changes: 6 additions & 19 deletions tap_aggregator/src/aggregator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,23 +199,20 @@ mod tests {
domain_separator: Eip712Domain,
) {
// Create 2 different receipts
let mut receipts = Vec::new();
receipts.push(
let receipts = vec![
EIP712SignedMessage::new(
&domain_separator,
Receipt::new(allocation_ids[0], 42).unwrap(),
&keys.0,
)
.unwrap(),
);
receipts.push(
EIP712SignedMessage::new(
&domain_separator,
Receipt::new(allocation_ids[0], 43).unwrap(),
&keys.0,
)
.unwrap(),
);
];

let res = aggregator::check_signatures_unique(&receipts);
assert!(res.is_ok());
Expand Down Expand Up @@ -299,31 +296,26 @@ mod tests {
allocation_ids: Vec<Address>,
domain_separator: Eip712Domain,
) {
let mut receipts = Vec::new();
receipts.push(
let receipts = vec![
EIP712SignedMessage::new(
&domain_separator,
Receipt::new(allocation_ids[0], 42).unwrap(),
&keys.0,
)
.unwrap(),
);
receipts.push(
EIP712SignedMessage::new(
&domain_separator,
Receipt::new(allocation_ids[0], 43).unwrap(),
&keys.0,
)
.unwrap(),
);
receipts.push(
EIP712SignedMessage::new(
&domain_separator,
Receipt::new(allocation_ids[1], 44).unwrap(),
&keys.0,
)
.unwrap(),
);
];

let res = aggregator::check_allocation_id(&receipts, allocation_ids[0]);

Expand All @@ -338,31 +330,26 @@ mod tests {
allocation_ids: Vec<Address>,
domain_separator: Eip712Domain,
) {
let mut receipts = Vec::new();
receipts.push(
let receipts = vec![
EIP712SignedMessage::new(
&domain_separator,
Receipt::new(allocation_ids[0], 42).unwrap(),
&keys.0,
)
.unwrap(),
);
receipts.push(
EIP712SignedMessage::new(
&domain_separator,
Receipt::new(allocation_ids[0], 43).unwrap(),
&keys.0,
)
.unwrap(),
);
receipts.push(
EIP712SignedMessage::new(
&domain_separator,
Receipt::new(allocation_ids[0], 44).unwrap(),
&keys.0,
)
.unwrap(),
);
];

let res = aggregator::check_allocation_id(&receipts, allocation_ids[0]);

Expand Down
2 changes: 1 addition & 1 deletion tap_core/benches/timeline_aggretion_protocol_benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use std::str::FromStr;

use alloy_primitives::Address;
use alloy_sol_types::{Eip712Domain};
use alloy_sol_types::Eip712Domain;
use criterion::{black_box, criterion_group, criterion_main, Criterion};
use ethers::signers::{LocalWallet, Signer, Wallet};
use ethers_core::k256::ecdsa::SigningKey;
Expand Down

0 comments on commit bc86d16

Please sign in to comment.