Skip to content

Commit 923f715

Browse files
committed
fix: clippy:mismatched-lifetime-syntaxes
1 parent e64c54d commit 923f715

File tree

9 files changed

+15
-15
lines changed

9 files changed

+15
-15
lines changed

clarity/src/vm/analysis/type_checker/contexts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ impl TypingContext<'_> {
104104
}
105105
}
106106

107-
pub fn extend(&self) -> CheckResult<TypingContext> {
107+
pub fn extend(&self) -> CheckResult<TypingContext<'_>> {
108108
if self.depth >= MAX_CONTEXT_DEPTH {
109109
Err(CheckError::new(CheckErrors::MaxContextDepthReached))
110110
} else {

clarity/src/vm/contexts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1875,7 +1875,7 @@ impl<'a> LocalContext<'a> {
18751875
self.depth
18761876
}
18771877

1878-
pub fn function_context(&self) -> &LocalContext {
1878+
pub fn function_context(&self) -> &LocalContext<'_> {
18791879
match self.function_context {
18801880
Some(context) => context,
18811881
None => self,

clarity/src/vm/database/clarity_store.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,11 @@ impl NullBackingStore {
187187
NullBackingStore {}
188188
}
189189

190-
pub fn as_clarity_db(&mut self) -> ClarityDatabase {
190+
pub fn as_clarity_db(&mut self) -> ClarityDatabase<'_> {
191191
ClarityDatabase::new(self, &NULL_HEADER_DB, &NULL_BURN_STATE_DB)
192192
}
193193

194-
pub fn as_analysis_db(&mut self) -> AnalysisDatabase {
194+
pub fn as_analysis_db(&mut self) -> AnalysisDatabase<'_> {
195195
AnalysisDatabase::new(self)
196196
}
197197
}

clarity/src/vm/database/sqlite.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -302,11 +302,11 @@ impl MemoryBackingStore {
302302
memory_marf
303303
}
304304

305-
pub fn as_clarity_db(&mut self) -> ClarityDatabase {
305+
pub fn as_clarity_db(&mut self) -> ClarityDatabase<'_> {
306306
ClarityDatabase::new(self, &NULL_HEADER_DB, &NULL_BURN_STATE_DB)
307307
}
308308

309-
pub fn as_analysis_db(&mut self) -> AnalysisDatabase {
309+
pub fn as_analysis_db(&mut self) -> AnalysisDatabase<'_> {
310310
AnalysisDatabase::new(self)
311311
}
312312
}
@@ -405,7 +405,7 @@ impl ClarityBackingStore for MemoryBackingStore {
405405
}
406406

407407
impl ToSql for ExecutionCost {
408-
fn to_sql(&self) -> rusqlite::Result<ToSqlOutput> {
408+
fn to_sql(&self) -> rusqlite::Result<ToSqlOutput<'_>> {
409409
let val = serde_json::to_string(self)
410410
.map_err(|e| rusqlite::Error::ToSqlConversionFailure(Box::new(e)))?;
411411
Ok(ToSqlOutput::from(val))

clarity/src/vm/tests/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ pub fn tl_env_factory() -> TopLevelMemoryEnvironmentGenerator {
171171

172172
pub struct MemoryEnvironmentGenerator(MemoryBackingStore);
173173
impl MemoryEnvironmentGenerator {
174-
fn get_env(&mut self, epoch: StacksEpochId) -> OwnedEnvironment {
174+
fn get_env(&mut self, epoch: StacksEpochId) -> OwnedEnvironment<'_, '_> {
175175
let mut db = self.0.as_clarity_db();
176176
db.begin();
177177
db.set_clarity_epoch_version(epoch).unwrap();
@@ -190,7 +190,7 @@ impl MemoryEnvironmentGenerator {
190190

191191
pub struct TopLevelMemoryEnvironmentGenerator(MemoryBackingStore);
192192
impl TopLevelMemoryEnvironmentGenerator {
193-
pub fn get_env(&mut self, epoch: StacksEpochId) -> OwnedEnvironment {
193+
pub fn get_env(&mut self, epoch: StacksEpochId) -> OwnedEnvironment<'_, '_> {
194194
let mut db = self.0.as_clarity_db();
195195
db.begin();
196196
db.set_clarity_epoch_version(epoch).unwrap();

stacks-node/src/event_dispatcher.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ impl EventObserver {
615615
fn make_new_block_txs_payload(
616616
receipt: &StacksTransactionReceipt,
617617
tx_index: u32,
618-
) -> TransactionEventPayload {
618+
) -> TransactionEventPayload<'_> {
619619
let tx = &receipt.transaction;
620620

621621
let status = match (receipt.post_condition_aborted, &receipt.result) {

stackslib/src/chainstate/nakamoto/staging_blocks.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ impl DerefMut for NakamotoStagingBlocksConn {
184184
}
185185

186186
impl NakamotoStagingBlocksConn {
187-
pub fn conn(&self) -> NakamotoStagingBlocksConnRef {
187+
pub fn conn(&self) -> NakamotoStagingBlocksConnRef<'_> {
188188
NakamotoStagingBlocksConnRef(&self.0)
189189
}
190190
}
@@ -211,7 +211,7 @@ impl NakamotoStagingBlocksTx<'_> {
211211
self.0.commit()
212212
}
213213

214-
pub fn conn(&self) -> NakamotoStagingBlocksConnRef {
214+
pub fn conn(&self) -> NakamotoStagingBlocksConnRef<'_> {
215215
NakamotoStagingBlocksConnRef(self.0.deref())
216216
}
217217
}
@@ -746,7 +746,7 @@ impl StacksChainState {
746746
}
747747

748748
/// Get a ref to the nakamoto staging blocks connection
749-
pub fn nakamoto_blocks_db(&self) -> NakamotoStagingBlocksConnRef {
749+
pub fn nakamoto_blocks_db(&self) -> NakamotoStagingBlocksConnRef<'_> {
750750
NakamotoStagingBlocksConnRef(&self.nakamoto_staging_blocks_conn)
751751
}
752752

stackslib/src/clarity_vm/clarity.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1707,7 +1707,7 @@ impl<'a> ClarityBlockConnection<'a, '_> {
17071707
})
17081708
}
17091709

1710-
pub fn start_transaction_processing(&mut self) -> ClarityTransactionConnection {
1710+
pub fn start_transaction_processing(&mut self) -> ClarityTransactionConnection<'_, '_> {
17111711
ClarityTransactionConnection::new(
17121712
&mut self.datastore,
17131713
self.header_db,

stackslib/src/util_lib/db.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ macro_rules! impl_byte_array_from_column {
334334
}
335335

336336
impl rusqlite::types::ToSql for $thing {
337-
fn to_sql(&self) -> rusqlite::Result<rusqlite::types::ToSqlOutput> {
337+
fn to_sql(&self) -> rusqlite::Result<rusqlite::types::ToSqlOutput<'_>> {
338338
let hex_str = self.to_hex();
339339
Ok(hex_str.into())
340340
}

0 commit comments

Comments
 (0)