From ad00a7ff80ac2b7d134e4e0686285b215b2cd16c Mon Sep 17 00:00:00 2001 From: Waylon Jepsen Date: Fri, 19 Apr 2024 15:02:58 -0700 Subject: [PATCH] clean --- kit/src/behaviors/allocate.rs | 2 +- kit/src/behaviors/creator.rs | 4 +--- kit/src/behaviors/deploy.rs | 2 +- kit/src/behaviors/swap.rs | 2 +- kit/src/behaviors/update.rs | 3 --- kit/src/pool/mod.rs | 3 +-- 6 files changed, 5 insertions(+), 11 deletions(-) diff --git a/kit/src/behaviors/allocate.rs b/kit/src/behaviors/allocate.rs index 4b77359e..63e97d0e 100644 --- a/kit/src/behaviors/allocate.rs +++ b/kit/src/behaviors/allocate.rs @@ -77,7 +77,7 @@ where P: PoolType + Debug + Send + Sync + 'static, E: Debug + Send + Sync + 'static, { - async fn process(&mut self, event: E) -> Result { + async fn process(&mut self, _event: E) -> Result { Ok(ControlFlow::Halt) } } diff --git a/kit/src/behaviors/creator.rs b/kit/src/behaviors/creator.rs index 5b750464..a46b064f 100644 --- a/kit/src/behaviors/creator.rs +++ b/kit/src/behaviors/creator.rs @@ -1,7 +1,5 @@ -use futures_util::StreamExt; - use super::*; -use crate::behaviors::{deploy::DeploymentData, token::Response}; +use crate::behaviors::token::Response; #[derive(Clone, Debug, Serialize, Deserialize)] pub struct Create { diff --git a/kit/src/behaviors/deploy.rs b/kit/src/behaviors/deploy.rs index 5778794c..a2106dc2 100644 --- a/kit/src/behaviors/deploy.rs +++ b/kit/src/behaviors/deploy.rs @@ -8,7 +8,7 @@ use bindings::{ use super::*; use crate::bindings::{ n_token_geometric_mean::NTokenGeometricMean, - n_token_geometric_mean_solver::{self, NTokenGeometricMeanSolver}, + n_token_geometric_mean_solver::NTokenGeometricMeanSolver, }; #[derive(Debug, Deserialize, Serialize)] diff --git a/kit/src/behaviors/swap.rs b/kit/src/behaviors/swap.rs index 67da257f..9c923718 100644 --- a/kit/src/behaviors/swap.rs +++ b/kit/src/behaviors/swap.rs @@ -1,5 +1,5 @@ use self::{ - bindings::erc20::ERC20, creator::PoolCreation, deploy::DeploymentData, pool::InputToken, + bindings::erc20::ERC20, creator::PoolCreation, pool::InputToken, update::UpdatoorQuerry, }; use super::*; diff --git a/kit/src/behaviors/update.rs b/kit/src/behaviors/update.rs index a27da045..8b0cb151 100644 --- a/kit/src/behaviors/update.rs +++ b/kit/src/behaviors/update.rs @@ -1,8 +1,5 @@ use std::collections::VecDeque; - -use bindings::idfmm::IDFMM; use tracing::warn; - use super::*; use crate::bindings::erc20::ERC20; diff --git a/kit/src/pool/mod.rs b/kit/src/pool/mod.rs index db25c45f..f4260812 100644 --- a/kit/src/pool/mod.rs +++ b/kit/src/pool/mod.rs @@ -2,7 +2,6 @@ use std::sync::Arc; use arbiter_core::middleware::ArbiterMiddleware; use ethers::{abi::AbiDecode, types::Bytes}; -use futures_util::future::err; use serde::{Deserialize, Serialize}; use tracing::warn; @@ -266,7 +265,7 @@ impl Pool

{ match tx_result { Ok(_) => {} Err(er) => match er.as_middleware_error().unwrap() { - arbiter_core::errors::ArbiterCoreError::ExecutionRevert { gas_used, output } => { + arbiter_core::errors::ArbiterCoreError::ExecutionRevert { gas_used: _, output } => { let error = dfmm::DFMMErrors::decode(output); warn!("Contract reverted with error: {:?}", error); }