Skip to content

Commit 0f12a72

Browse files
authored
Merge pull request #6356 from fdefelici/fix/clippy-rust-1-89
fix: clippy issue due to rust 1.89.0 update
2 parents 762e44b + 923f715 commit 0f12a72

File tree

14 files changed

+22
-22
lines changed

14 files changed

+22
-22
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-common/src/bitvec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ impl<const MAX_SIZE: u16> BitVec<MAX_SIZE> {
171171
Ok(bitvec)
172172
}
173173

174-
pub fn iter(&self) -> BitVecIter<MAX_SIZE> {
174+
pub fn iter(&self) -> BitVecIter<'_, MAX_SIZE> {
175175
let byte = self.data.first();
176176
BitVecIter {
177177
index: 0,

stacks-common/src/deps_common/bitcoin/blockdata/script.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ impl Script {
385385
/// opcodes, datapushes and errors. At most one error will be returned and then the
386386
/// iterator will end. To instead iterate over the script as sequence of bytes, treat
387387
/// it as a slice using `script[..]` or convert it to a vector using `into_bytes()`.
388-
pub fn iter(&self, enforce_minimal: bool) -> Instructions {
388+
pub fn iter(&self, enforce_minimal: bool) -> Instructions<'_> {
389389
Instructions {
390390
data: &self.0[..],
391391
enforce_minimal,

stacks-common/src/types/sqlite.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ impl FromSql for Sha256dHash {
3636
}
3737

3838
impl ToSql for Sha256dHash {
39-
fn to_sql(&self) -> rusqlite::Result<ToSqlOutput> {
39+
fn to_sql(&self) -> rusqlite::Result<ToSqlOutput<'_>> {
4040
let hex_str = self.be_hex_string();
4141
Ok(hex_str.into())
4242
}
4343
}
4444

45-
impl rusqlite::types::ToSql for StacksAddress {
46-
fn to_sql(&self) -> rusqlite::Result<rusqlite::types::ToSqlOutput> {
45+
impl ToSql for StacksAddress {
46+
fn to_sql(&self) -> rusqlite::Result<ToSqlOutput<'_>> {
4747
let addr_str = self.to_string();
4848
Ok(addr_str.into())
4949
}

stacks-common/src/util/macros.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ macro_rules! impl_byte_array_rusqlite_only {
749749
}
750750

751751
impl rusqlite::types::ToSql for $thing {
752-
fn to_sql(&self) -> rusqlite::Result<rusqlite::types::ToSqlOutput> {
752+
fn to_sql(&self) -> rusqlite::Result<rusqlite::types::ToSqlOutput<'_>> {
753753
let hex_str = self.to_hex();
754754
Ok(hex_str.into())
755755
}

stacks-common/src/util/vrf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ impl Eq for VRFPublicKey {}
6868

6969
impl PartialOrd for VRFPublicKey {
7070
fn partial_cmp(&self, other: &VRFPublicKey) -> Option<Ordering> {
71-
Some(self.as_bytes().to_vec().cmp(&other.as_bytes().to_vec()))
71+
Some(self.cmp(other))
7272
}
7373
}
7474

0 commit comments

Comments
 (0)