Skip to content

Commit 78bced1

Browse files
committed
remove lifetimes that can be elided, fix make lint
1 parent 3306851 commit 78bced1

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

fendermint/rocksdb/src/kvstore.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ where
208208
}
209209
}
210210

211-
impl<'a, S> KVWrite<S> for RocksDbWriteTx<'a>
211+
impl<S> KVWrite<S> for RocksDbWriteTx<'_>
212212
where
213213
S: KVStore<Repr = Vec<u8>>,
214214
S::Namespace: AsRef<str>,
@@ -243,7 +243,7 @@ where
243243
}
244244
}
245245

246-
impl<'a> KVTransaction for RocksDbWriteTx<'a> {
246+
impl KVTransaction for RocksDbWriteTx<'_> {
247247
fn commit(self) -> KVResult<()> {
248248
let tx = self.take_tx();
249249
tx.commit().map_err(to_kv_error)
@@ -255,7 +255,7 @@ impl<'a> KVTransaction for RocksDbWriteTx<'a> {
255255
}
256256
}
257257

258-
impl<'a> Drop for RocksDbWriteTx<'a> {
258+
impl Drop for RocksDbWriteTx<'_> {
259259
fn drop(&mut self) {
260260
if !thread::panicking() {
261261
panic!("Transaction prematurely dropped. Must call `.commit()` or `.rollback()`.");

fendermint/storage/src/im.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ pub struct Transaction<'a, S: KVStore, M> {
120120
_mode: M,
121121
}
122122

123-
impl<'a, S: KVStore> KVTransaction for Transaction<'a, S, Write> {
123+
impl<S: KVStore> KVTransaction for Transaction<'_, S, Write> {
124124
// An exclusive lock has already been taken.
125125
fn commit(mut self) -> KVResult<()> {
126126
let mut guard = self.backend.data.lock().unwrap();
@@ -135,7 +135,7 @@ impl<'a, S: KVStore> KVTransaction for Transaction<'a, S, Write> {
135135
}
136136
}
137137

138-
impl<'a, S: KVStore, M> Drop for Transaction<'a, S, M> {
138+
impl<S: KVStore, M> Drop for Transaction<'_, S, M> {
139139
fn drop(&mut self) {
140140
if self.token.is_some() && !thread::panicking() {
141141
panic!("Transaction prematurely dropped. Must call `.commit()` or `.rollback()`.");
@@ -177,7 +177,7 @@ where
177177
}
178178
}
179179

180-
impl<'a, S: KVStore> KVWrite<S> for Transaction<'a, S, Write>
180+
impl<S: KVStore> KVWrite<S> for Transaction<'_, S, Write>
181181
where
182182
S::Repr: Hash + Eq,
183183
{
@@ -231,7 +231,7 @@ where
231231
}
232232
}
233233

234-
impl<'a, S, K, V> Iterator for KVIter<'a, S, K, V>
234+
impl<S, K, V> Iterator for KVIter<'_, S, K, V>
235235
where
236236
S: KVStore + Decode<K> + Decode<V>,
237237
{

0 commit comments

Comments
 (0)