mirror of
https://github.com/romanz/electrs.git
synced 2024-11-19 01:43:29 +01:00
Fix a few lifetime-related clippy warnings.
Found by nightly toolchain.
This commit is contained in:
parent
adf68c0802
commit
65f37d0d1f
@ -239,8 +239,8 @@ impl DBStore {
|
||||
self.iter_prefix_cf(self.txid_cf(), prefix)
|
||||
}
|
||||
|
||||
fn iter_cf<'a, const N: usize>(
|
||||
&'a self,
|
||||
fn iter_cf<const N: usize>(
|
||||
&self,
|
||||
cf: &rocksdb::ColumnFamily,
|
||||
readopts: rocksdb::ReadOptions,
|
||||
prefix: Option<HashPrefix>,
|
||||
@ -385,7 +385,7 @@ impl<'a, const N: usize> DBIterator<'a, N> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, const N: usize> Iterator for DBIterator<'a, N> {
|
||||
impl<const N: usize> Iterator for DBIterator<'_, N> {
|
||||
type Item = [u8; N];
|
||||
|
||||
fn next(&mut self) -> Option<Self::Item> {
|
||||
|
@ -246,7 +246,7 @@ fn index_single_block(
|
||||
height: usize,
|
||||
}
|
||||
|
||||
impl<'a> Visitor for IndexBlockVisitor<'a> {
|
||||
impl Visitor for IndexBlockVisitor<'_> {
|
||||
fn visit_transaction(&mut self, tx: &bsl::Transaction) -> ControlFlow<()> {
|
||||
let txid = bsl_txid(tx);
|
||||
self.batch
|
||||
|
@ -240,7 +240,7 @@ impl ScriptHashStatus {
|
||||
fn confirmed_height_entries<'a>(
|
||||
&'a self,
|
||||
chain: &'a Chain,
|
||||
) -> impl Iterator<Item = (usize, &[TxEntry])> + 'a {
|
||||
) -> impl Iterator<Item = (usize, &'a [TxEntry])> + 'a {
|
||||
self.confirmed
|
||||
.iter()
|
||||
.filter_map(move |(blockhash, entries)| {
|
||||
@ -252,7 +252,7 @@ impl ScriptHashStatus {
|
||||
|
||||
/// Iterate through confirmed TxEntries.
|
||||
/// Skip entries from stale blocks.
|
||||
fn confirmed_entries<'a>(&'a self, chain: &'a Chain) -> impl Iterator<Item = &TxEntry> + 'a {
|
||||
fn confirmed_entries<'a>(&'a self, chain: &'a Chain) -> impl Iterator<Item = &'a TxEntry> + 'a {
|
||||
self.confirmed_height_entries(chain)
|
||||
.flat_map(|(_height, entries)| entries)
|
||||
}
|
||||
@ -565,7 +565,7 @@ fn filter_block_txs_inputs(
|
||||
pos: usize,
|
||||
}
|
||||
|
||||
impl<'a> Visitor for FindInputs<'a> {
|
||||
impl Visitor for FindInputs<'_> {
|
||||
fn visit_transaction(&mut self, tx: &bsl::Transaction) -> ControlFlow<()> {
|
||||
if !self.buffer.is_empty() {
|
||||
let result = std::mem::take(&mut self.buffer);
|
||||
|
Loading…
Reference in New Issue
Block a user