mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore(lint): fix lint storage (#11485)
This commit is contained in:
@ -190,14 +190,14 @@ pub struct EtlIter<'a> {
|
||||
files: &'a mut Vec<EtlFile>,
|
||||
}
|
||||
|
||||
impl<'a> EtlIter<'a> {
|
||||
impl EtlIter<'_> {
|
||||
/// Peeks into the next element
|
||||
pub fn peek(&self) -> Option<&(Vec<u8>, Vec<u8>)> {
|
||||
self.heap.peek().map(|(Reverse(entry), _)| entry)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Iterator for EtlIter<'a> {
|
||||
impl Iterator for EtlIter<'_> {
|
||||
type Item = std::io::Result<(Vec<u8>, Vec<u8>)>;
|
||||
|
||||
fn next(&mut self) -> Option<Self::Item> {
|
||||
|
||||
@ -149,7 +149,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
impl<'cursor, T: Table, CURSOR: DbCursorRO<T>> Iterator for Walker<'cursor, T, CURSOR> {
|
||||
impl<T: Table, CURSOR: DbCursorRO<T>> Iterator for Walker<'_, T, CURSOR> {
|
||||
type Item = Result<TableRow<T>, DatabaseError>;
|
||||
fn next(&mut self) -> Option<Self::Item> {
|
||||
let start = self.start.take();
|
||||
@ -174,7 +174,7 @@ impl<'cursor, T: Table, CURSOR: DbCursorRO<T>> Walker<'cursor, T, CURSOR> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'cursor, T: Table, CURSOR: DbCursorRW<T> + DbCursorRO<T>> Walker<'cursor, T, CURSOR> {
|
||||
impl<T: Table, CURSOR: DbCursorRW<T> + DbCursorRO<T>> Walker<'_, T, CURSOR> {
|
||||
/// Delete current item that walker points to.
|
||||
pub fn delete_current(&mut self) -> Result<(), DatabaseError> {
|
||||
self.start.take();
|
||||
@ -217,7 +217,7 @@ impl<'cursor, T: Table, CURSOR: DbCursorRO<T>> ReverseWalker<'cursor, T, CURSOR>
|
||||
}
|
||||
}
|
||||
|
||||
impl<'cursor, T: Table, CURSOR: DbCursorRW<T> + DbCursorRO<T>> ReverseWalker<'cursor, T, CURSOR> {
|
||||
impl<T: Table, CURSOR: DbCursorRW<T> + DbCursorRO<T>> ReverseWalker<'_, T, CURSOR> {
|
||||
/// Delete current item that walker points to.
|
||||
pub fn delete_current(&mut self) -> Result<(), DatabaseError> {
|
||||
self.start.take();
|
||||
@ -225,7 +225,7 @@ impl<'cursor, T: Table, CURSOR: DbCursorRW<T> + DbCursorRO<T>> ReverseWalker<'cu
|
||||
}
|
||||
}
|
||||
|
||||
impl<'cursor, T: Table, CURSOR: DbCursorRO<T>> Iterator for ReverseWalker<'cursor, T, CURSOR> {
|
||||
impl<T: Table, CURSOR: DbCursorRO<T>> Iterator for ReverseWalker<'_, T, CURSOR> {
|
||||
type Item = Result<TableRow<T>, DatabaseError>;
|
||||
|
||||
fn next(&mut self) -> Option<Self::Item> {
|
||||
@ -266,7 +266,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
impl<'cursor, T: Table, CURSOR: DbCursorRO<T>> Iterator for RangeWalker<'cursor, T, CURSOR> {
|
||||
impl<T: Table, CURSOR: DbCursorRO<T>> Iterator for RangeWalker<'_, T, CURSOR> {
|
||||
type Item = Result<TableRow<T>, DatabaseError>;
|
||||
|
||||
fn next(&mut self) -> Option<Self::Item> {
|
||||
@ -316,7 +316,7 @@ impl<'cursor, T: Table, CURSOR: DbCursorRO<T>> RangeWalker<'cursor, T, CURSOR> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'cursor, T: Table, CURSOR: DbCursorRW<T> + DbCursorRO<T>> RangeWalker<'cursor, T, CURSOR> {
|
||||
impl<T: Table, CURSOR: DbCursorRW<T> + DbCursorRO<T>> RangeWalker<'_, T, CURSOR> {
|
||||
/// Delete current item that walker points to.
|
||||
pub fn delete_current(&mut self) -> Result<(), DatabaseError> {
|
||||
self.start.take();
|
||||
@ -349,7 +349,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
impl<'cursor, T: DupSort, CURSOR: DbCursorRW<T> + DbDupCursorRO<T>> DupWalker<'cursor, T, CURSOR> {
|
||||
impl<T: DupSort, CURSOR: DbCursorRW<T> + DbDupCursorRO<T>> DupWalker<'_, T, CURSOR> {
|
||||
/// Delete current item that walker points to.
|
||||
pub fn delete_current(&mut self) -> Result<(), DatabaseError> {
|
||||
self.start.take();
|
||||
@ -357,7 +357,7 @@ impl<'cursor, T: DupSort, CURSOR: DbCursorRW<T> + DbDupCursorRO<T>> DupWalker<'c
|
||||
}
|
||||
}
|
||||
|
||||
impl<'cursor, T: DupSort, CURSOR: DbDupCursorRO<T>> Iterator for DupWalker<'cursor, T, CURSOR> {
|
||||
impl<T: DupSort, CURSOR: DbDupCursorRO<T>> Iterator for DupWalker<'_, T, CURSOR> {
|
||||
type Item = Result<TableRow<T>, DatabaseError>;
|
||||
fn next(&mut self) -> Option<Self::Item> {
|
||||
let start = self.start.take();
|
||||
|
||||
@ -115,7 +115,7 @@ impl<'a> From<&'a B256> for KeyOrNumber<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> From<u64> for KeyOrNumber<'a> {
|
||||
impl From<u64> for KeyOrNumber<'_> {
|
||||
fn from(value: u64) -> Self {
|
||||
KeyOrNumber::Number(value)
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ pub trait TableObject: Sized {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'tx> TableObject for Cow<'tx, [u8]> {
|
||||
impl TableObject for Cow<'_, [u8]> {
|
||||
fn decode(_: &[u8]) -> Result<Self, Error> {
|
||||
unreachable!()
|
||||
}
|
||||
|
||||
@ -539,7 +539,7 @@ where
|
||||
},
|
||||
}
|
||||
|
||||
impl<'cur, K, Key, Value> IntoIter<'cur, K, Key, Value>
|
||||
impl<K, Key, Value> IntoIter<'_, K, Key, Value>
|
||||
where
|
||||
K: TransactionKind,
|
||||
Key: TableObject,
|
||||
@ -551,7 +551,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
impl<'cur, K, Key, Value> Iterator for IntoIter<'cur, K, Key, Value>
|
||||
impl<K, Key, Value> Iterator for IntoIter<'_, K, Key, Value>
|
||||
where
|
||||
K: TransactionKind,
|
||||
Key: TableObject,
|
||||
@ -646,7 +646,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
impl<'cur, K, Key, Value> Iterator for Iter<'cur, K, Key, Value>
|
||||
impl<K, Key, Value> Iterator for Iter<'_, K, Key, Value>
|
||||
where
|
||||
K: TransactionKind,
|
||||
Key: TableObject,
|
||||
@ -736,7 +736,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
impl<'cur, K, Key, Value> fmt::Debug for IterDup<'cur, K, Key, Value>
|
||||
impl<K, Key, Value> fmt::Debug for IterDup<'_, K, Key, Value>
|
||||
where
|
||||
K: TransactionKind,
|
||||
Key: TableObject,
|
||||
|
||||
@ -266,13 +266,13 @@ mod dictionaries_serde {
|
||||
#[derive(Serialize, Deserialize, Deref)]
|
||||
pub(crate) struct ZstdDictionaries<'a>(Vec<ZstdDictionary<'a>>);
|
||||
|
||||
impl<'a> std::fmt::Debug for ZstdDictionaries<'a> {
|
||||
impl std::fmt::Debug for ZstdDictionaries<'_> {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
f.debug_struct("ZstdDictionaries").field("num", &self.len()).finish_non_exhaustive()
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> ZstdDictionaries<'a> {
|
||||
impl ZstdDictionaries<'_> {
|
||||
#[cfg(test)]
|
||||
/// Creates [`ZstdDictionaries`].
|
||||
pub(crate) fn new(raw: Vec<RawDictionary>) -> Self {
|
||||
@ -321,7 +321,7 @@ pub(crate) enum ZstdDictionary<'a> {
|
||||
Loaded(DecoderDictionary<'a>),
|
||||
}
|
||||
|
||||
impl<'a> ZstdDictionary<'a> {
|
||||
impl ZstdDictionary<'_> {
|
||||
/// Returns a reference to the expected `RawDictionary`
|
||||
pub(crate) const fn raw(&self) -> Option<&RawDictionary> {
|
||||
match self {
|
||||
@ -339,7 +339,7 @@ impl<'a> ZstdDictionary<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'de, 'a> Deserialize<'de> for ZstdDictionary<'a> {
|
||||
impl<'de> Deserialize<'de> for ZstdDictionary<'_> {
|
||||
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
|
||||
where
|
||||
D: Deserializer<'de>,
|
||||
@ -349,7 +349,7 @@ impl<'de, 'a> Deserialize<'de> for ZstdDictionary<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Serialize for ZstdDictionary<'a> {
|
||||
impl Serialize for ZstdDictionary<'_> {
|
||||
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
|
||||
where
|
||||
S: Serializer,
|
||||
@ -362,7 +362,7 @@ impl<'a> Serialize for ZstdDictionary<'a> {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
impl<'a> PartialEq for ZstdDictionary<'a> {
|
||||
impl PartialEq for ZstdDictionary<'_> {
|
||||
fn eq(&self, other: &Self) -> bool {
|
||||
if let (Self::Raw(a), Self::Raw(b)) = (self, &other) {
|
||||
return a == b
|
||||
|
||||
@ -18,7 +18,7 @@ pub struct NippyJarCursor<'a, H = ()> {
|
||||
row: u64,
|
||||
}
|
||||
|
||||
impl<'a, H: NippyJarHeader> std::fmt::Debug for NippyJarCursor<'a, H> {
|
||||
impl<H: NippyJarHeader> std::fmt::Debug for NippyJarCursor<'_, H> {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
f.debug_struct("NippyJarCursor").field("config", &self.jar).finish_non_exhaustive()
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@ impl<'a, K, V> ForwardInMemoryCursor<'a, K, V> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, K, V> ForwardInMemoryCursor<'a, K, V>
|
||||
impl<K, V> ForwardInMemoryCursor<'_, K, V>
|
||||
where
|
||||
K: PartialOrd + Clone,
|
||||
V: Clone,
|
||||
|
||||
@ -132,7 +132,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, C> HashedCursor for HashedPostStateAccountCursor<'a, C>
|
||||
impl<C> HashedCursor for HashedPostStateAccountCursor<'_, C>
|
||||
where
|
||||
C: HashedCursor<Value = Account>,
|
||||
{
|
||||
@ -276,7 +276,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, C> HashedCursor for HashedPostStateStorageCursor<'a, C>
|
||||
impl<C> HashedCursor for HashedPostStateStorageCursor<'_, C>
|
||||
where
|
||||
C: HashedStorageCursor<Value = U256>,
|
||||
{
|
||||
@ -304,7 +304,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, C> HashedStorageCursor for HashedPostStateStorageCursor<'a, C>
|
||||
impl<C> HashedStorageCursor for HashedPostStateStorageCursor<'_, C>
|
||||
where
|
||||
C: HashedStorageCursor<Value = U256>,
|
||||
{
|
||||
|
||||
@ -188,7 +188,7 @@ impl<'a, C> InMemoryStorageTrieCursor<'a, C> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, C: TrieCursor> InMemoryStorageTrieCursor<'a, C> {
|
||||
impl<C: TrieCursor> InMemoryStorageTrieCursor<'_, C> {
|
||||
fn seek_inner(
|
||||
&mut self,
|
||||
key: Nibbles,
|
||||
@ -237,7 +237,7 @@ impl<'a, C: TrieCursor> InMemoryStorageTrieCursor<'a, C> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, C: TrieCursor> TrieCursor for InMemoryStorageTrieCursor<'a, C> {
|
||||
impl<C: TrieCursor> TrieCursor for InMemoryStorageTrieCursor<'_, C> {
|
||||
fn seek_exact(
|
||||
&mut self,
|
||||
key: Nibbles,
|
||||
|
||||
@ -455,7 +455,7 @@ pub mod serde_bincode_compat {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> SerializeAs<super::TrieUpdates> for TrieUpdates<'a> {
|
||||
impl SerializeAs<super::TrieUpdates> for TrieUpdates<'_> {
|
||||
fn serialize_as<S>(source: &super::TrieUpdates, serializer: S) -> Result<S::Ok, S::Error>
|
||||
where
|
||||
S: Serializer,
|
||||
@ -515,7 +515,7 @@ pub mod serde_bincode_compat {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> SerializeAs<super::StorageTrieUpdates> for StorageTrieUpdates<'a> {
|
||||
impl SerializeAs<super::StorageTrieUpdates> for StorageTrieUpdates<'_> {
|
||||
fn serialize_as<S>(
|
||||
source: &super::StorageTrieUpdates,
|
||||
serializer: S,
|
||||
|
||||
Reference in New Issue
Block a user