From 5cb1d01ff19f9bb7d864041b8c17d7c8ce89c217 Mon Sep 17 00:00:00 2001 From: Noah Saso Date: Tue, 24 Dec 2024 14:41:40 -0500 Subject: [PATCH] fixed lint --- contracts/external/cw-payroll-factory/src/state.rs | 4 ++-- contracts/voting/dao-voting-cw721-staked/src/state.rs | 2 +- packages/cw-snapshot-vector-map/src/lib.rs | 2 +- packages/dao-testing/src/suite/cw20_suite.rs | 6 +++--- packages/dao-testing/src/suite/cw4_suite.rs | 6 +++--- packages/dao-testing/src/suite/cw721_suite.rs | 6 +++--- packages/dao-testing/src/suite/token_suite.rs | 6 +++--- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/contracts/external/cw-payroll-factory/src/state.rs b/contracts/external/cw-payroll-factory/src/state.rs index c65514faa..02fe577e7 100644 --- a/contracts/external/cw-payroll-factory/src/state.rs +++ b/contracts/external/cw-payroll-factory/src/state.rs @@ -18,8 +18,8 @@ pub struct TokenIndexes<'a> { pub recipient: MultiIndex<'a, String, VestingContract, String>, } -impl<'a> IndexList for TokenIndexes<'a> { - fn get_indexes(&'_ self) -> Box> + '_> { +impl IndexList for TokenIndexes<'_> { + fn get_indexes(&self) -> Box> + '_> { let v: Vec<&dyn Index> = vec![&self.instantiator, &self.recipient]; Box::new(v.into_iter()) } diff --git a/contracts/voting/dao-voting-cw721-staked/src/state.rs b/contracts/voting/dao-voting-cw721-staked/src/state.rs index 77a3a11a5..4884b6f77 100644 --- a/contracts/voting/dao-voting-cw721-staked/src/state.rs +++ b/contracts/voting/dao-voting-cw721-staked/src/state.rs @@ -59,7 +59,7 @@ pub fn register_staked_nft( storage: &mut dyn Storage, height: u64, staker: &Addr, - token_id: &String, + token_id: &str, ) -> StdResult<()> { let add_one = |prev: Option| -> StdResult { prev.unwrap_or_default() diff --git a/packages/cw-snapshot-vector-map/src/lib.rs b/packages/cw-snapshot-vector-map/src/lib.rs index b4850e2f2..3a587793d 100644 --- a/packages/cw-snapshot-vector-map/src/lib.rs +++ b/packages/cw-snapshot-vector-map/src/lib.rs @@ -31,7 +31,7 @@ pub struct LoadedItem { pub expiration: Option, } -impl<'a, K, V> SnapshotVectorMap<'a, K, V> { +impl SnapshotVectorMap<'_, K, V> { /// Creates a new [`SnapshotVectorMap`] with the given storage keys. /// /// Example: diff --git a/packages/dao-testing/src/suite/cw20_suite.rs b/packages/dao-testing/src/suite/cw20_suite.rs index 4cbdd6667..94cf94eec 100644 --- a/packages/dao-testing/src/suite/cw20_suite.rs +++ b/packages/dao-testing/src/suite/cw20_suite.rs @@ -23,7 +23,7 @@ pub struct Cw20DaoExtra { pub type Cw20TestDao = TestDao; -impl<'a> Deref for DaoTestingSuiteCw20<'a> { +impl Deref for DaoTestingSuiteCw20<'_> { type Target = DaoTestingSuiteBase; fn deref(&self) -> &Self::Target { @@ -31,7 +31,7 @@ impl<'a> Deref for DaoTestingSuiteCw20<'a> { } } -impl<'a> DerefMut for DaoTestingSuiteCw20<'a> { +impl DerefMut for DaoTestingSuiteCw20<'_> { fn deref_mut(&mut self) -> &mut Self::Target { self.base } @@ -143,7 +143,7 @@ impl<'a> DaoTestingSuiteCw20<'a> { } } -impl<'a> DaoTestingSuite for DaoTestingSuiteCw20<'a> { +impl DaoTestingSuite for DaoTestingSuiteCw20<'_> { fn base(&self) -> &DaoTestingSuiteBase { self } diff --git a/packages/dao-testing/src/suite/cw4_suite.rs b/packages/dao-testing/src/suite/cw4_suite.rs index 343ac2a83..d1f9366d3 100644 --- a/packages/dao-testing/src/suite/cw4_suite.rs +++ b/packages/dao-testing/src/suite/cw4_suite.rs @@ -17,7 +17,7 @@ pub struct Cw4DaoExtra { pub type Cw4TestDao = TestDao; -impl<'a> Deref for DaoTestingSuiteCw4<'a> { +impl Deref for DaoTestingSuiteCw4<'_> { type Target = DaoTestingSuiteBase; fn deref(&self) -> &Self::Target { @@ -25,7 +25,7 @@ impl<'a> Deref for DaoTestingSuiteCw4<'a> { } } -impl<'a> DerefMut for DaoTestingSuiteCw4<'a> { +impl DerefMut for DaoTestingSuiteCw4<'_> { fn deref_mut(&mut self) -> &mut Self::Target { self.base } @@ -66,7 +66,7 @@ impl<'a> DaoTestingSuiteCw4<'a> { } } -impl<'a> DaoTestingSuite for DaoTestingSuiteCw4<'a> { +impl DaoTestingSuite for DaoTestingSuiteCw4<'_> { fn base(&self) -> &DaoTestingSuiteBase { self } diff --git a/packages/dao-testing/src/suite/cw721_suite.rs b/packages/dao-testing/src/suite/cw721_suite.rs index 6fab1bbdf..311256120 100644 --- a/packages/dao-testing/src/suite/cw721_suite.rs +++ b/packages/dao-testing/src/suite/cw721_suite.rs @@ -27,7 +27,7 @@ pub struct Cw721DaoExtra { pub type Cw721TestDao = TestDao; -impl<'a> Deref for DaoTestingSuiteCw721<'a> { +impl Deref for DaoTestingSuiteCw721<'_> { type Target = DaoTestingSuiteBase; fn deref(&self) -> &Self::Target { @@ -35,7 +35,7 @@ impl<'a> Deref for DaoTestingSuiteCw721<'a> { } } -impl<'a> DerefMut for DaoTestingSuiteCw721<'a> { +impl DerefMut for DaoTestingSuiteCw721<'_> { fn deref_mut(&mut self) -> &mut Self::Target { self.base } @@ -128,7 +128,7 @@ impl<'a> DaoTestingSuiteCw721<'a> { } } -impl<'a> DaoTestingSuite for DaoTestingSuiteCw721<'a> { +impl DaoTestingSuite for DaoTestingSuiteCw721<'_> { fn base(&self) -> &DaoTestingSuiteBase { self } diff --git a/packages/dao-testing/src/suite/token_suite.rs b/packages/dao-testing/src/suite/token_suite.rs index 28513c85a..8a5f3689d 100644 --- a/packages/dao-testing/src/suite/token_suite.rs +++ b/packages/dao-testing/src/suite/token_suite.rs @@ -22,7 +22,7 @@ pub struct TokenDaoExtra { pub type TokenTestDao = TestDao; -impl<'a> Deref for DaoTestingSuiteToken<'a> { +impl Deref for DaoTestingSuiteToken<'_> { type Target = DaoTestingSuiteBase; fn deref(&self) -> &Self::Target { @@ -30,7 +30,7 @@ impl<'a> Deref for DaoTestingSuiteToken<'a> { } } -impl<'a> DerefMut for DaoTestingSuiteToken<'a> { +impl DerefMut for DaoTestingSuiteToken<'_> { fn deref_mut(&mut self) -> &mut Self::Target { self.base } @@ -136,7 +136,7 @@ impl<'a> DaoTestingSuiteToken<'a> { } } -impl<'a> DaoTestingSuite for DaoTestingSuiteToken<'a> { +impl DaoTestingSuite for DaoTestingSuiteToken<'_> { fn base(&self) -> &DaoTestingSuiteBase { self }