Skip to content

Commit 2813c09

Browse files
committed
fix: ambiguous elided lifetimes
1 parent 72050f3 commit 2813c09

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

internal/mithril-dmq/src/consumer/pallas.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ impl<M: TryFromBytes + Debug> DmqConsumerPallas<M> {
5151
}
5252

5353
/// Gets the cached `DmqClient`, creating a new one if it does not exist.
54-
async fn get_client(&self) -> StdResult<MutexGuard<Option<DmqClient>>> {
54+
async fn get_client(&self) -> StdResult<MutexGuard<'_, Option<DmqClient>>> {
5555
{
5656
// Run this in a separate block to avoid dead lock on the Mutex
5757
let client_lock = self.client.lock().await;

internal/mithril-persistence/src/database/version_checker.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ mod tests {
317317
.read::<i64, _>(0)
318318
}
319319

320-
fn create_db_checker(connection: &ConnectionThreadSafe) -> DatabaseVersionChecker {
320+
fn create_db_checker(connection: &ConnectionThreadSafe) -> DatabaseVersionChecker<'_> {
321321
DatabaseVersionChecker::new(
322322
discard_logger(),
323323
ApplicationNodeType::Aggregator,

internal/mithril-persistence/src/sqlite/connection_extensions.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use crate::sqlite::{EntityCursor, Query, SqliteConnection, Transaction};
88
/// Extension trait for the [SqliteConnection] type.
99
pub trait ConnectionExtensions {
1010
/// Begin a transaction on the connection.
11-
fn begin_transaction(&self) -> StdResult<Transaction>;
11+
fn begin_transaction(&self) -> StdResult<Transaction<'_>>;
1212

1313
/// Execute the given sql query and return the value of the first cell read.
1414
fn query_single_cell<Q: AsRef<str>, T: ReadableWithIndex>(
@@ -18,7 +18,7 @@ pub trait ConnectionExtensions {
1818
) -> StdResult<T>;
1919

2020
/// Fetch entities from the database using the given query.
21-
fn fetch<Q: Query>(&self, query: Q) -> StdResult<EntityCursor<Q::Entity>>;
21+
fn fetch<Q: Query>(&self, query: Q) -> StdResult<EntityCursor<'_, Q::Entity>>;
2222

2323
/// Fetch the first entity from the database returned using the given query.
2424
fn fetch_first<Q: Query>(&self, query: Q) -> StdResult<Option<Q::Entity>> {
@@ -39,7 +39,7 @@ pub trait ConnectionExtensions {
3939
}
4040

4141
impl ConnectionExtensions for SqliteConnection {
42-
fn begin_transaction(&self) -> StdResult<Transaction> {
42+
fn begin_transaction(&self) -> StdResult<Transaction<'_>> {
4343
Ok(Transaction::begin(self)?)
4444
}
4545

@@ -54,7 +54,7 @@ impl ConnectionExtensions for SqliteConnection {
5454
statement.read::<T, _>(0).with_context(|| "Read query error")
5555
}
5656

57-
fn fetch<Q: Query>(&self, query: Q) -> StdResult<EntityCursor<Q::Entity>> {
57+
fn fetch<Q: Query>(&self, query: Q) -> StdResult<EntityCursor<'_, Q::Entity>> {
5858
let (condition, params) = query.filters().expand();
5959
let sql = query.get_definition(&condition);
6060
let cursor = prepare_statement(self, &sql)?.into_iter().bind(&params[..])?;

internal/mithril-persistence/src/sqlite/connection_pool.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ impl SqliteConnectionPool {
4747
}
4848

4949
/// Get a connection from the pool
50-
pub fn connection(&self) -> StdResult<ResourcePoolItem<SqlitePooledConnection>> {
50+
pub fn connection(&self) -> StdResult<ResourcePoolItem<'_, SqlitePooledConnection>> {
5151
let timeout = Duration::from_millis(1000);
5252
let connection = self.connection_pool.acquire_resource(timeout)?;
5353

mithril-aggregator/src/services/stake_distribution.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ impl Default for UpdateToken {
118118
}
119119

120120
impl UpdateToken {
121-
pub fn update(&self, epoch: Epoch) -> StdResult<MutexGuard<()>> {
121+
pub fn update(&self, epoch: Epoch) -> StdResult<MutexGuard<'_, ()>> {
122122
let update_semaphore = self.is_busy.try_lock().map_err(|_| {
123123
let last_updated_epoch = self.busy_on_epoch.read().unwrap();
124124

0 commit comments

Comments
 (0)