Skip to content

Commit

Permalink
Placate clippy (ordinals#4116)
Browse files Browse the repository at this point in the history
  • Loading branch information
raphjaph authored Nov 29, 2024
1 parent f150529 commit ee2c25b
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion crates/mockcore/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ pub struct FundRawTransactionResult {
pub change_position: i32,
}

impl<'a> Default for TransactionTemplate<'a> {
impl Default for TransactionTemplate<'_> {
fn default() -> Self {
Self {
fee: 0,
Expand Down
2 changes: 1 addition & 1 deletion src/index/updater.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub(crate) struct Updater<'index> {
pub(super) sat_ranges_since_flush: u64,
}

impl<'index> Updater<'index> {
impl Updater<'_> {
pub(crate) fn update_index(&mut self, mut wtx: WriteTransaction) -> Result {
let start = Instant::now();
let starting_height = u32::try_from(self.index.client.get_block_count()?).unwrap() + 1;
Expand Down
2 changes: 1 addition & 1 deletion src/index/updater/inscription_updater.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pub(super) struct InscriptionUpdater<'a, 'tx> {
pub(super) unbound_inscriptions: u64,
}

impl<'a, 'tx> InscriptionUpdater<'a, 'tx> {
impl InscriptionUpdater<'_, '_> {
pub(super) fn index_inscriptions(
&mut self,
tx: &Transaction,
Expand Down
2 changes: 1 addition & 1 deletion src/index/updater/rune_updater.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub(super) struct RuneUpdater<'a, 'tx, 'client> {
pub(super) transaction_id_to_rune: &'a mut Table<'tx, &'static TxidValue, u128>,
}

impl<'a, 'tx, 'client> RuneUpdater<'a, 'tx, 'client> {
impl RuneUpdater<'_, '_, '_> {
pub(super) fn index_runes(&mut self, tx_index: u32, tx: &Transaction, txid: Txid) -> Result<()> {
let artifact = Runestone::decipher(tx);

Expand Down
11 changes: 9 additions & 2 deletions src/index/utxo_entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,15 @@ impl UtxoEntry {
}

impl redb::Value for &UtxoEntry {
type SelfType<'a> = &'a UtxoEntry where Self: 'a;
type AsBytes<'a> = &'a [u8] where Self: 'a;
type SelfType<'a>
= &'a UtxoEntry
where
Self: 'a;

type AsBytes<'a>
= &'a [u8]
where
Self: 'a;

fn fixed_width() -> Option<usize> {
None
Expand Down
2 changes: 1 addition & 1 deletion src/templates/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use super::*;

pub(crate) struct MetadataHtml<'a>(pub &'a Value);

impl<'a> Display for MetadataHtml<'a> {
impl Display for MetadataHtml<'_> {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
match self.0 {
Value::Array(x) => {
Expand Down
4 changes: 4 additions & 0 deletions tests/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ fn run() {
}

child.kill().unwrap();
child.wait().unwrap();
}

#[test]
Expand Down Expand Up @@ -741,6 +742,7 @@ fn run_no_sync() {
}

child.kill().unwrap();
child.wait().unwrap();

let builder = CommandBuilder::new(format!(
"server --no-sync --address 127.0.0.1 --http-port {port}",
Expand Down Expand Up @@ -770,6 +772,7 @@ fn run_no_sync() {
}

child.kill().unwrap();
child.wait().unwrap();
}

#[test]
Expand Down Expand Up @@ -814,6 +817,7 @@ fn authentication() {
assert_eq!(response.status(), 200);

child.kill().unwrap();
child.wait().unwrap();
}

#[cfg(unix)]
Expand Down

0 comments on commit ee2c25b

Please sign in to comment.