Make clippy happy

This commit is contained in:
Florian Pellissier
2024-03-11 18:32:42 +01:00
parent accfa074fd
commit c283a81341
3 changed files with 5 additions and 8 deletions

View File

@@ -8,6 +8,7 @@ fn main() -> Result<()> {
let files = fs::read_dir(abi_folder)?;
let mut mod_rs_content = String::new();
mod_rs_content.push_str("#![allow(clippy::all)]\n");
for file in files {
let file = file?;

View File

@@ -1,3 +1,4 @@
#![allow(clippy::all)]
pub mod yearn_linear_pool_factory;
pub mod composable_stable_pool_factory;
pub mod vault;

View File

@@ -102,7 +102,7 @@ pub fn map_balance_deltas(
) -> Result<tycho::BalanceDeltas, anyhow::Error> {
Ok(tycho::BalanceDeltas {
balance_deltas: block
.events::<abi::vault::events::PoolBalanceChanged>(&[&VAULT_ADDRESS])
.events::<abi::vault::events::PoolBalanceChanged>(&[VAULT_ADDRESS])
.flat_map(|(event, log)| {
event
.tokens
@@ -111,12 +111,7 @@ pub fn map_balance_deltas(
.filter_map(|(token, delta)| {
let component_id: Vec<_> = event.pool_id.into();
if store
.get_last(format!("pool:{0}", hex::encode(&component_id)))
.is_none()
{
return None;
}
store.get_last(format!("pool:{0}", hex::encode(&component_id)))?;
Some(tycho::BalanceDelta {
ord: log.log.ordinal,
@@ -253,7 +248,7 @@ pub fn map_changes(
}),
changes: transaction_contract_changes
.drain()
.sorted_unstable_by_key(|(index, _)| index.clone())
.sorted_unstable_by_key(|(index, _)| *index)
.filter_map(|(_, change)| {
if change.contract_changes.is_empty()
&& change.component_changes.is_empty()