mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-09 23:38:10 -05:00
elided lifetimes
This commit is contained in:
@@ -381,7 +381,7 @@ pub struct ReusableCursor<'cell, T: Table, C: DbCursorRO<T>> {
|
||||
_phantom: std::marker::PhantomData<T>,
|
||||
}
|
||||
|
||||
impl<'cell, T, C> fmt::Debug for ReusableCursor<'cell, T, C>
|
||||
impl<T, C> fmt::Debug for ReusableCursor<'_, T, C>
|
||||
where
|
||||
T: Table,
|
||||
C: DbCursorRO<T> + fmt::Debug,
|
||||
@@ -398,13 +398,13 @@ impl<'cell, T: Table, C: DbCursorRO<T>> ReusableCursor<'cell, T, C> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'cell, T: Table, C: DbCursorRO<T>> Drop for ReusableCursor<'cell, T, C> {
|
||||
impl<T: Table, C: DbCursorRO<T>> Drop for ReusableCursor<'_, T, C> {
|
||||
fn drop(&mut self) {
|
||||
self.cell.set(self.cursor.take());
|
||||
}
|
||||
}
|
||||
|
||||
impl<'cell, T: Table, C: DbCursorRO<T>> std::ops::Deref for ReusableCursor<'cell, T, C> {
|
||||
impl<T: Table, C: DbCursorRO<T>> std::ops::Deref for ReusableCursor<'_, T, C> {
|
||||
type Target = C;
|
||||
|
||||
fn deref(&self) -> &Self::Target {
|
||||
@@ -412,7 +412,7 @@ impl<'cell, T: Table, C: DbCursorRO<T>> std::ops::Deref for ReusableCursor<'cell
|
||||
}
|
||||
}
|
||||
|
||||
impl<'cell, T: Table, C: DbCursorRO<T>> std::ops::DerefMut for ReusableCursor<'cell, T, C> {
|
||||
impl<T: Table, C: DbCursorRO<T>> std::ops::DerefMut for ReusableCursor<'_, T, C> {
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
self.cursor.as_mut().expect("cursor always exists")
|
||||
}
|
||||
|
||||
@@ -41,11 +41,11 @@ impl<TX: DbTx> ReusableStateCursors<TX> {
|
||||
/// Gets a reusable cursor for the `StorageChangeSets` table.
|
||||
///
|
||||
/// If a cursor is cached, it will be reused. Otherwise, a new cursor is created.
|
||||
pub(crate) fn storage_changesets<'cell>(
|
||||
&'cell self,
|
||||
pub(crate) fn storage_changesets(
|
||||
&self,
|
||||
tx: &TX,
|
||||
) -> Result<
|
||||
ReusableCursor<'cell, StorageChangeSets, TX::DupCursor<StorageChangeSets>>,
|
||||
ReusableCursor<'_, StorageChangeSets, TX::DupCursor<StorageChangeSets>>,
|
||||
DatabaseError,
|
||||
>
|
||||
where
|
||||
@@ -59,11 +59,11 @@ impl<TX: DbTx> ReusableStateCursors<TX> {
|
||||
/// Gets a reusable cursor for the `PlainStorageState` table.
|
||||
///
|
||||
/// If a cursor is cached, it will be reused. Otherwise, a new cursor is created.
|
||||
pub(crate) fn plain_storage_state<'cell>(
|
||||
&'cell self,
|
||||
pub(crate) fn plain_storage_state(
|
||||
&self,
|
||||
tx: &TX,
|
||||
) -> Result<
|
||||
ReusableCursor<'cell, PlainStorageState, TX::DupCursor<PlainStorageState>>,
|
||||
ReusableCursor<'_, PlainStorageState, TX::DupCursor<PlainStorageState>>,
|
||||
DatabaseError,
|
||||
>
|
||||
where
|
||||
@@ -77,10 +77,10 @@ impl<TX: DbTx> ReusableStateCursors<TX> {
|
||||
/// Gets a reusable cursor for the `AccountsHistory` table.
|
||||
///
|
||||
/// If a cursor is cached, it will be reused. Otherwise, a new cursor is created.
|
||||
pub(crate) fn accounts_history<'cell>(
|
||||
&'cell self,
|
||||
pub(crate) fn accounts_history(
|
||||
&self,
|
||||
tx: &TX,
|
||||
) -> Result<ReusableCursor<'cell, AccountsHistory, TX::Cursor<AccountsHistory>>, DatabaseError>
|
||||
) -> Result<ReusableCursor<'_, AccountsHistory, TX::Cursor<AccountsHistory>>, DatabaseError>
|
||||
where
|
||||
TX::Cursor<AccountsHistory>: DbCursorRO<AccountsHistory>,
|
||||
{
|
||||
@@ -91,10 +91,10 @@ impl<TX: DbTx> ReusableStateCursors<TX> {
|
||||
/// Gets a reusable cursor for the `StoragesHistory` table.
|
||||
///
|
||||
/// If a cursor is cached, it will be reused. Otherwise, a new cursor is created.
|
||||
pub(crate) fn storages_history<'cell>(
|
||||
&'cell self,
|
||||
pub(crate) fn storages_history(
|
||||
&self,
|
||||
tx: &TX,
|
||||
) -> Result<ReusableCursor<'cell, StoragesHistory, TX::Cursor<StoragesHistory>>, DatabaseError>
|
||||
) -> Result<ReusableCursor<'_, StoragesHistory, TX::Cursor<StoragesHistory>>, DatabaseError>
|
||||
where
|
||||
TX::Cursor<StoragesHistory>: DbCursorRO<StoragesHistory>,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user