mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-16 20:39:10 +00:00
Rust 1.89 compiler lint fix (#7644)
Fix lints for Rust 1.89 beta compiler
This commit is contained in:
@@ -83,7 +83,7 @@ impl Environment {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn create_databases(&self) -> Result<OpenDatabases, Error> {
|
||||
pub fn create_databases(&self) -> Result<OpenDatabases<'_>, Error> {
|
||||
match self {
|
||||
#[cfg(feature = "mdbx")]
|
||||
Self::Mdbx(env) => env.create_databases(),
|
||||
@@ -95,7 +95,7 @@ impl Environment {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn begin_rw_txn(&self) -> Result<RwTransaction, Error> {
|
||||
pub fn begin_rw_txn(&self) -> Result<RwTransaction<'_>, Error> {
|
||||
match self {
|
||||
#[cfg(feature = "mdbx")]
|
||||
Self::Mdbx(env) => env.begin_rw_txn().map(RwTransaction::Mdbx),
|
||||
@@ -194,7 +194,7 @@ impl<'env> RwTransaction<'env> {
|
||||
|
||||
impl Cursor<'_> {
|
||||
/// Return the first key in the current database while advancing the cursor's position.
|
||||
pub fn first_key(&mut self) -> Result<Option<Key>, Error> {
|
||||
pub fn first_key(&mut self) -> Result<Option<Key<'_>>, Error> {
|
||||
match self {
|
||||
#[cfg(feature = "mdbx")]
|
||||
Cursor::Mdbx(cursor) => cursor.first_key(),
|
||||
@@ -207,7 +207,7 @@ impl Cursor<'_> {
|
||||
}
|
||||
|
||||
/// Return the last key in the current database while advancing the cursor's position.
|
||||
pub fn last_key(&mut self) -> Result<Option<Key>, Error> {
|
||||
pub fn last_key(&mut self) -> Result<Option<Key<'_>>, Error> {
|
||||
match self {
|
||||
#[cfg(feature = "mdbx")]
|
||||
Cursor::Mdbx(cursor) => cursor.last_key(),
|
||||
@@ -219,7 +219,7 @@ impl Cursor<'_> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn next_key(&mut self) -> Result<Option<Key>, Error> {
|
||||
pub fn next_key(&mut self) -> Result<Option<Key<'_>>, Error> {
|
||||
match self {
|
||||
#[cfg(feature = "mdbx")]
|
||||
Cursor::Mdbx(cursor) => cursor.next_key(),
|
||||
|
||||
@@ -41,7 +41,7 @@ impl Environment {
|
||||
Ok(Environment { env })
|
||||
}
|
||||
|
||||
pub fn create_databases(&self) -> Result<OpenDatabases, Error> {
|
||||
pub fn create_databases(&self) -> Result<OpenDatabases<'_>, Error> {
|
||||
let indexed_attestation_db = self
|
||||
.env
|
||||
.create_db(Some(INDEXED_ATTESTATION_DB), Self::db_flags())?;
|
||||
@@ -80,7 +80,7 @@ impl Environment {
|
||||
})
|
||||
}
|
||||
|
||||
pub fn begin_rw_txn(&self) -> Result<RwTransaction, Error> {
|
||||
pub fn begin_rw_txn(&self) -> Result<RwTransaction<'_>, Error> {
|
||||
let txn = self.env.begin_rw_txn()?;
|
||||
Ok(RwTransaction { txn })
|
||||
}
|
||||
@@ -137,7 +137,7 @@ impl<'env> RwTransaction<'env> {
|
||||
}
|
||||
|
||||
impl<'env> Cursor<'env> {
|
||||
pub fn first_key(&mut self) -> Result<Option<Key>, Error> {
|
||||
pub fn first_key(&mut self) -> Result<Option<Key<'_>>, Error> {
|
||||
let opt_key = self
|
||||
.cursor
|
||||
.get(None, None, MDB_FIRST)
|
||||
|
||||
Reference in New Issue
Block a user