mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Fix Rust 1.89 compiler warnings in slasher tests. (#7844)
As described in title, failing test here https://github.com/sigp/lighthouse/actions/runs/16818997885/job/47646515894
This commit is contained in:
@@ -44,7 +44,7 @@ impl Environment {
|
||||
Ok(Environment { env })
|
||||
}
|
||||
|
||||
pub fn create_databases(&self) -> Result<OpenDatabases, Error> {
|
||||
pub fn create_databases(&self) -> Result<OpenDatabases<'_>, Error> {
|
||||
let txn = self.begin_rw_txn()?;
|
||||
txn.create_db(INDEXED_ATTESTATION_DB)?;
|
||||
txn.create_db(INDEXED_ATTESTATION_ID_DB)?;
|
||||
@@ -77,7 +77,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 })
|
||||
}
|
||||
@@ -106,7 +106,7 @@ impl<'env> RwTransaction<'env> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn open_db(&self, name: &'static str) -> Result<Database, Error> {
|
||||
pub fn open_db(&self, name: &'static str) -> Result<Database<'_>, Error> {
|
||||
let db = self.txn.open_db(Some(name))?;
|
||||
Ok(Database { db })
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ impl Environment {
|
||||
})
|
||||
}
|
||||
|
||||
pub fn create_databases(&self) -> Result<OpenDatabases, Error> {
|
||||
pub fn create_databases(&self) -> Result<OpenDatabases<'_>, Error> {
|
||||
let indexed_attestation_db = self.create_table(INDEXED_ATTESTATION_DB)?;
|
||||
let indexed_attestation_id_db = self.create_table(INDEXED_ATTESTATION_ID_DB)?;
|
||||
let attesters_db = self.create_table(ATTESTERS_DB)?;
|
||||
@@ -94,7 +94,7 @@ impl Environment {
|
||||
vec![config.database_path.join(REDB_DATA_FILENAME)]
|
||||
}
|
||||
|
||||
pub fn begin_rw_txn(&self) -> Result<RwTransaction, Error> {
|
||||
pub fn begin_rw_txn(&self) -> Result<RwTransaction<'_>, Error> {
|
||||
let mut txn = self.db.begin_write()?;
|
||||
txn.set_durability(redb::Durability::Eventual);
|
||||
Ok(RwTransaction {
|
||||
@@ -160,7 +160,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 table_definition: TableDefinition<'_, &[u8], &[u8]> =
|
||||
TableDefinition::new(&self.db.table_name);
|
||||
let table = self.txn.open_table(table_definition)?;
|
||||
|
||||
Reference in New Issue
Block a user