Make clippy happy
This commit is contained in:
@@ -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?;
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user