Skip to content

Commit

Permalink
chore: fix lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
scarmuega committed Jan 23, 2025
1 parent 11ff6e0 commit f9b399d
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 25 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions src/ledger/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use pallas::ledger::primitives::conway::GovAction;
use pallas::ledger::traverse::{Era, MultiEraBlock, MultiEraInput, MultiEraUpdate};
use pallas::{crypto::hash::Hash, ledger::traverse::MultiEraOutput};
use pparams::Genesis;
Expand Down Expand Up @@ -201,7 +200,10 @@ pub fn compute_undo_delta(
Ok(delta)
}

pub fn compute_origin_delta(byron: &pallas::ledger::configs::byron::GenesisFile, shelley: &pallas::ledger::configs::shelley::GenesisFile) -> LedgerDelta {
pub fn compute_origin_delta(
byron: &pallas::ledger::configs::byron::GenesisFile,
shelley: &pallas::ledger::configs::shelley::GenesisFile,
) -> LedgerDelta {
let mut delta = LedgerDelta::default();

// byron
Expand Down Expand Up @@ -234,7 +236,8 @@ pub fn compute_origin_delta(byron: &pallas::ledger::configs::byron::GenesisFile,
datum_hash: None,
};

let utxo_body = MultiEraOutput::from_alonzo_compatible(&utxo_body, Era::Shelley).to_owned();
let utxo_body =
MultiEraOutput::from_alonzo_compatible(&utxo_body, Era::Shelley).to_owned();
delta.produced_utxo.insert(utxo_ref, utxo_body.into());
}
}
Expand Down
7 changes: 2 additions & 5 deletions src/ledger/pparams/hacks/mainnet_epoch526.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ pub fn change(era: &mut EraSummary) {
1964219, 24520, 3,
];

match &mut era.pparams {
pallas::applying::MultiEraProtocolParameters::Conway(x) => {
x.cost_models_for_script_languages.plutus_v3 = Some(costs)
}
_ => (),
if let pallas::applying::MultiEraProtocolParameters::Conway(x) = &mut era.pparams {
x.cost_models_for_script_languages.plutus_v3 = Some(costs)
}
}
7 changes: 2 additions & 5 deletions src/ledger/pparams/hacks/preprod_epoch191.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ pub fn change(era: &mut EraSummary) {
1964219, 24520, 3,
];

match &mut era.pparams {
pallas::applying::MultiEraProtocolParameters::Conway(x) => {
x.cost_models_for_script_languages.plutus_v3 = Some(costs)
}
_ => (),
if let pallas::applying::MultiEraProtocolParameters::Conway(x) = &mut era.pparams {
x.cost_models_for_script_languages.plutus_v3 = Some(costs)
}
}
7 changes: 2 additions & 5 deletions src/ledger/pparams/hacks/preview_epoch736.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ pub fn change(era: &mut EraSummary) {
1964219, 24520, 3,
];

match &mut era.pparams {
pallas::applying::MultiEraProtocolParameters::Conway(x) => {
x.cost_models_for_script_languages.plutus_v3 = Some(costs)
}
_ => (),
if let pallas::applying::MultiEraProtocolParameters::Conway(x) = &mut era.pparams {
x.cost_models_for_script_languages.plutus_v3 = Some(costs)
}
}
2 changes: 1 addition & 1 deletion src/ledger/pparams/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use pallas::{
traverse::MultiEraUpdate,
},
};
use tracing::{debug, trace, warn};
use tracing::{debug, warn};

mod hacks;
mod summary;
Expand Down
2 changes: 1 addition & 1 deletion src/relay/chainsync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub struct Session<'a> {
connection: N2NServer,
}

impl<'a> Session<'a> {
impl Session<'_> {
fn prepare_tip(&self) -> Result<Tip, Error> {
let tip = self
.wal
Expand Down
2 changes: 1 addition & 1 deletion src/serve/o7s_unix/chainsync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub struct Session<'a> {
connection: N2CServer,
}

impl<'a> Session<'a> {
impl Session<'_> {
fn prepare_tip(&self) -> Result<Tip, Error> {
let tip = self
.wal
Expand Down
2 changes: 1 addition & 1 deletion src/wal/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pub trait ReadUtils<'a> {
fn into_blocks(self) -> impl Iterator<Item = Option<RawBlock>>;
}

impl<'a, T> ReadUtils<'a> for T
impl<T> ReadUtils<'_> for T
where
T: Iterator<Item = LogEntry> + Sized,
{
Expand Down

0 comments on commit f9b399d

Please sign in to comment.