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 files = fs::read_dir(abi_folder)?;
let mut mod_rs_content = String::new(); let mut mod_rs_content = String::new();
mod_rs_content.push_str("#![allow(clippy::all)]\n");
for file in files { for file in files {
let file = file?; let file = file?;

View File

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

View File

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