Skip to content

Commit bcbab6d

Browse files
committed
Clippy
1 parent b971af4 commit bcbab6d

File tree

26 files changed

+56
-50
lines changed

26 files changed

+56
-50
lines changed

framework/contracts/native/registry/src/migrate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub struct NamespaceIndexes<'a> {
2121
pub account_id: MultiIndex<'a, AccountId, AccountId, &'a Namespace>,
2222
}
2323

24-
impl<'a> IndexList<AccountId> for NamespaceIndexes<'a> {
24+
impl IndexList<AccountId> for NamespaceIndexes<'_> {
2525
fn get_indexes(&'_ self) -> Box<dyn Iterator<Item = &'_ dyn Index<AccountId>> + '_> {
2626
let v: Vec<&dyn Index<AccountId>> = vec![&self.account_id];
2727
Box::new(v.into_iter())

framework/packages/abstract-adapter/src/msgs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
/// <MyAdapter as abstract_sdk::base::InstantiateEndpoint>::InstantiateMsg;
2020
/// pub type ExecuteMsg = <MyAdapter as abstract_sdk::base::ExecuteEndpoint>::ExecuteMsg;
2121
/// pub type QueryMsg = <MyAdapter as abstract_sdk::base::QueryEndpoint>::QueryMsg;
22-
22+
///
2323
/// // Implements the trait-bounds for the abstract adapter messages, which allows them to be used in the Adapter type.
2424
/// // Also implements `Into<ExecuteMsg> for MyAdapterExecuteMsg` and `Into<QueryMsg> for MyAdapterQueryMsg`.
2525
/// // This enables the use of the `impl_into` macro of cw-orchestrator.

framework/packages/abstract-app/src/msgs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
/// pub type ExecuteMsg = <MyApp as sdk::base::ExecuteEndpoint>::ExecuteMsg;
2121
/// pub type QueryMsg = <MyApp as sdk::base::QueryEndpoint>::QueryMsg;
2222
/// pub type MigrateMsg = <MyApp as sdk::base::MigrateEndpoint>::MigrateMsg;
23-
23+
///
2424
/// // Implements the trait-bounds for the abstract app messages, which allows them to be used in the App type.
2525
/// // Also implements `Into<ExecuteMsg> for MyAppExecuteMsg` and `Into<QueryMsg> for MyAppQueryMsg`.
2626
/// // This enables the use of the `impl_into` macro of cw-orchestrator.

framework/packages/abstract-client/src/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ impl<Chain: CwEnv> AbstractClient<Chain> {
169169
pub fn sub_account_builder<'a>(
170170
&'a self,
171171
account: &'a Account<Chain>,
172-
) -> AbstractClientResult<AccountBuilder<Chain>> {
172+
) -> AbstractClientResult<AccountBuilder<'a, Chain>> {
173173
let mut builder = AccountBuilder::new(&self.abstr);
174174
builder.sub_account(account);
175175
builder.name("Sub Account");

framework/packages/abstract-sdk/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ use cosmwasm_std::{Addr, CosmosMsg, Deps, StdResult, Uint128, Env};
3838
// Trait to retrieve the Splitter object
3939
// Depends on the ability to transfer funds
4040
pub trait SplitterInterface: TransferInterface {
41-
fn splitter<'a>(&'a self, deps: Deps<'a>) -> Splitter<Self> {
41+
fn splitter<'a>(&'a self, deps: Deps<'a>) -> Splitter<'a, Self> {
4242
Splitter { base: self, deps }
4343
}
4444
}

framework/packages/abstract-sdk/src/apis/adapter.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ pub trait AdapterInterface: ModuleInterface + ModuleIdentification {
2727
let adapters: Adapters<MockModule> = module.adapters(deps.as_ref());
2828
```
2929
*/
30-
fn adapters<'a>(&'a self, deps: Deps<'a>) -> Adapters<Self> {
30+
fn adapters<'a>(&'a self, deps: Deps<'a>) -> Adapters<'a, Self> {
3131
Adapters { base: self, deps }
3232
}
3333
}
3434

3535
impl<T> AdapterInterface for T where T: ModuleInterface + ModuleIdentification {}
3636

37-
impl<'a, T: AdapterInterface> AbstractApi<T> for Adapters<'a, T> {
37+
impl<T: AdapterInterface> AbstractApi<T> for Adapters<'_, T> {
3838
const API_ID: &'static str = "Adapters";
3939

4040
fn base(&self) -> &T {
@@ -67,7 +67,7 @@ pub struct Adapters<'a, T: AdapterInterface> {
6767
deps: Deps<'a>,
6868
}
6969

70-
impl<'a, T: AdapterInterface> Adapters<'a, T> {
70+
impl<T: AdapterInterface> Adapters<'_, T> {
7171
/// Interactions with Abstract Adapters
7272
/// Construct an adapter execute message.
7373
pub fn execute<M: Serialize + Into<abstract_std::adapter::ExecuteMsg<M>>>(

framework/packages/abstract-sdk/src/apis/app.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ pub trait AppInterface: ModuleInterface + ModuleIdentification {
2727
let apps: Apps<MockModule> = module.apps(deps.as_ref());
2828
```
2929
*/
30-
fn apps<'a>(&'a self, deps: Deps<'a>) -> Apps<Self> {
30+
fn apps<'a>(&'a self, deps: Deps<'a>) -> Apps<'a, Self> {
3131
Apps { base: self, deps }
3232
}
3333
}
3434

3535
impl<T> AppInterface for T where T: ModuleInterface + ModuleIdentification {}
3636

37-
impl<'a, T: AppInterface> AbstractApi<T> for Apps<'a, T> {
37+
impl<T: AppInterface> AbstractApi<T> for Apps<'_, T> {
3838
const API_ID: &'static str = "Apps";
3939

4040
fn base(&self) -> &T {
@@ -67,7 +67,7 @@ pub struct Apps<'a, T: AppInterface> {
6767
deps: Deps<'a>,
6868
}
6969

70-
impl<'a, T: AppInterface> Apps<'a, T> {
70+
impl<T: AppInterface> Apps<'_, T> {
7171
/// Construct an app request message.
7272
pub fn execute<M: Serialize>(
7373
&self,

framework/packages/abstract-sdk/src/apis/bank.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pub trait TransferInterface:
3535
let bank: Bank<MockModule> = module.bank(deps.as_ref(), );
3636
```
3737
*/
38-
fn bank<'a>(&'a self, deps: Deps<'a>) -> Bank<Self> {
38+
fn bank<'a>(&'a self, deps: Deps<'a>) -> Bank<'a, Self> {
3939
Bank { base: self, deps }
4040
}
4141
}
@@ -45,7 +45,7 @@ impl<T> TransferInterface for T where
4545
{
4646
}
4747

48-
impl<'a, T: TransferInterface> AbstractApi<T> for Bank<'a, T> {
48+
impl<T: TransferInterface> AbstractApi<T> for Bank<'_, T> {
4949
const API_ID: &'static str = "Bank";
5050

5151
fn base(&self) -> &T {
@@ -79,7 +79,7 @@ pub struct Bank<'a, T: TransferInterface> {
7979
deps: Deps<'a>,
8080
}
8181

82-
impl<'a, T: TransferInterface> Bank<'a, T> {
82+
impl<T: TransferInterface> Bank<'_, T> {
8383
/// Get the balances of the provided assets.
8484
pub fn balances(&self, assets: &[AssetEntry]) -> AbstractSdkResult<Vec<Asset>> {
8585
assets
@@ -114,7 +114,7 @@ impl<'a, T: TransferInterface> Bank<'a, T> {
114114
}
115115
}
116116

117-
impl<'a, T: TransferInterface + AccountExecutor> Bank<'a, T> {
117+
impl<T: TransferInterface + AccountExecutor> Bank<'_, T> {
118118
/// Transfer the provided funds from the Account to the recipient.
119119
/// ```
120120
/// # use cosmwasm_std::{Addr, Response, Deps, DepsMut, MessageInfo, Env};

framework/packages/abstract-sdk/src/apis/execution.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ pub trait Execution: AccountExecutor + ModuleIdentification {
3333
let executor: Executor<MockModule> = module.executor(deps.as_ref());
3434
```
3535
*/
36-
fn executor<'a>(&'a self, deps: Deps<'a>) -> Executor<Self> {
36+
fn executor<'a>(&'a self, deps: Deps<'a>) -> Executor<'a, Self> {
3737
Executor { base: self, deps }
3838
}
3939
}
4040

4141
impl<T> Execution for T where T: AccountExecutor + ModuleIdentification {}
4242

43-
impl<'a, T: Execution> AbstractApi<T> for Executor<'a, T> {
43+
impl<T: Execution> AbstractApi<T> for Executor<'_, T> {
4444
const API_ID: &'static str = "Executor";
4545

4646
fn base(&self) -> &T {
@@ -76,7 +76,7 @@ pub struct Executor<'a, T: Execution> {
7676
deps: Deps<'a>,
7777
}
7878

79-
impl<'a, T: Execution> Executor<'a, T> {
79+
impl<T: Execution> Executor<'_, T> {
8080
/// Execute a single message on the `ModuleActionWithData` endpoint.
8181
fn execute_with_data(&self, msg: CosmosMsg) -> AbstractSdkResult<ExecutorMsg> {
8282
let msg = self.base.execute_on_account(

framework/packages/abstract-sdk/src/apis/ibc.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pub trait IbcInterface:
4343
let ibc_client: IbcClient<MockModule> = module.ibc_client(deps.as_ref());
4444
```
4545
*/
46-
fn ibc_client<'a>(&'a self, deps: Deps<'a>) -> IbcClient<Self> {
46+
fn ibc_client<'a>(&'a self, deps: Deps<'a>) -> IbcClient<'a, Self> {
4747
IbcClient { base: self, deps }
4848
}
4949
}
@@ -53,7 +53,7 @@ impl<T> IbcInterface for T where
5353
{
5454
}
5555

56-
impl<'a, T: IbcInterface> AbstractApi<T> for IbcClient<'a, T> {
56+
impl<T: IbcInterface> AbstractApi<T> for IbcClient<'_, T> {
5757
const API_ID: &'static str = "IbcClient";
5858

5959
fn base(&self) -> &T {
@@ -86,7 +86,7 @@ pub struct IbcClient<'a, T: IbcInterface> {
8686
deps: Deps<'a>,
8787
}
8888

89-
impl<'a, T: IbcInterface> IbcClient<'a, T> {
89+
impl<T: IbcInterface> IbcClient<'_, T> {
9090
/// Get address of this module
9191
pub fn module_address(&self) -> AbstractSdkResult<Addr> {
9292
let modules = self.base.modules(self.deps);
@@ -206,7 +206,7 @@ impl<'a, T: IbcInterface> IbcClient<'a, T> {
206206
}
207207
}
208208

209-
impl<'a, T: IbcInterface + AccountExecutor> IbcClient<'a, T> {
209+
impl<T: IbcInterface + AccountExecutor> IbcClient<'_, T> {
210210
/// Execute on ibc client
211211
pub fn execute(
212212
&self,

framework/packages/abstract-sdk/src/apis/modules.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ pub trait ModuleInterface: AccountIdentification + Dependencies + ModuleIdentifi
2929
let modules: Modules<MockModule> = module.modules(deps.as_ref());
3030
```
3131
*/
32-
fn modules<'a>(&'a self, deps: Deps<'a>) -> Modules<Self> {
32+
fn modules<'a>(&'a self, deps: Deps<'a>) -> Modules<'a, Self> {
3333
Modules { base: self, deps }
3434
}
3535
}
3636

3737
impl<T> ModuleInterface for T where T: AccountIdentification + Dependencies + ModuleIdentification {}
3838

39-
impl<'a, T: ModuleInterface> AbstractApi<T> for Modules<'a, T> {
39+
impl<T: ModuleInterface> AbstractApi<T> for Modules<'_, T> {
4040
const API_ID: &'static str = "Modules";
4141

4242
fn base(&self) -> &T {
@@ -69,7 +69,7 @@ pub struct Modules<'a, T: ModuleInterface> {
6969
deps: Deps<'a>,
7070
}
7171

72-
impl<'a, T: ModuleInterface> Modules<'a, T> {
72+
impl<T: ModuleInterface> Modules<'_, T> {
7373
/// Retrieve the address of an application in this Account.
7474
/// This should **not** be used to execute messages on an `Api`.
7575
/// Use `Modules::api_request(..)` instead.

framework/packages/abstract-sdk/src/apis/splitter.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ use crate::{
1111
// Trait to retrieve the Splitter object
1212
// Depends on the ability to transfer funds
1313
pub trait SplitterInterface: TransferInterface + AccountExecutor + ModuleIdentification {
14-
fn splitter<'a>(&'a self, deps: Deps<'a>) -> Splitter<Self> {
14+
fn splitter<'a>(&'a self, deps: Deps<'a>) -> Splitter<'a, Self> {
1515
Splitter { base: self, deps }
1616
}
1717
}
1818

1919
// Implement for every object that can transfer funds
2020
impl<T> SplitterInterface for T where T: TransferInterface + AccountExecutor + ModuleIdentification {}
2121

22-
impl<'a, T: SplitterInterface> AbstractApi<T> for Splitter<'a, T> {
22+
impl<T: SplitterInterface> AbstractApi<T> for Splitter<'_, T> {
2323
const API_ID: &'static str = "Splitter";
2424

2525
fn base(&self) -> &T {
@@ -36,7 +36,7 @@ pub struct Splitter<'a, T: SplitterInterface> {
3636
deps: Deps<'a>,
3737
}
3838

39-
impl<'a, T: SplitterInterface> Splitter<'a, T> {
39+
impl<T: SplitterInterface> Splitter<'_, T> {
4040
/// Split an asset to multiple users
4141
pub fn split(&self, asset: AnsAsset, receivers: &[Addr]) -> AbstractSdkResult<AccountAction> {
4242
// split the asset between all receivers

framework/packages/abstract-sdk/src/apis/verify.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ pub trait AccountVerification: AbstractRegistryAccess + ModuleIdentification {
3333
let acc_registry: AccountRegistry<MockModule> = module.account_registry(deps.as_ref()).unwrap();
3434
```
3535
*/
36-
fn account_registry<'a>(&'a self, deps: Deps<'a>) -> AbstractSdkResult<AccountRegistry<Self>> {
36+
fn account_registry<'a>(
37+
&'a self,
38+
deps: Deps<'a>,
39+
) -> AbstractSdkResult<AccountRegistry<'a, Self>> {
3740
let vc = self.abstract_registry(deps)?;
3841
Ok(AccountRegistry {
3942
base: self,
@@ -45,7 +48,7 @@ pub trait AccountVerification: AbstractRegistryAccess + ModuleIdentification {
4548

4649
impl<T> AccountVerification for T where T: AbstractRegistryAccess + ModuleIdentification {}
4750

48-
impl<'a, T: AccountVerification> AbstractApi<T> for AccountRegistry<'a, T> {
51+
impl<T: AccountVerification> AbstractApi<T> for AccountRegistry<'_, T> {
4952
const API_ID: &'static str = "AccountRegistry";
5053

5154
fn base(&self) -> &T {
@@ -80,7 +83,7 @@ pub struct AccountRegistry<'a, T: AccountVerification> {
8083
registry: RegistryContract,
8184
}
8285

83-
impl<'a, T: AccountVerification> AccountRegistry<'a, T> {
86+
impl<T: AccountVerification> AccountRegistry<'_, T> {
8487
/// Verify if the provided address is indeed an Abstract Account.
8588
pub fn assert_is_account(&self, maybe_account: &Addr) -> AbstractSdkResult<Account> {
8689
self.registry

framework/packages/abstract-sdk/src/apis/version_registry.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ pub trait ModuleRegistryInterface: AbstractRegistryAccess + ModuleIdentification
3636
let mod_registry: ModuleRegistry<MockModule> = module.module_registry(deps.as_ref()).unwrap();
3737
```
3838
*/
39-
fn module_registry<'a>(&'a self, deps: Deps<'a>) -> AbstractSdkResult<ModuleRegistry<Self>> {
39+
fn module_registry<'a>(
40+
&'a self,
41+
deps: Deps<'a>,
42+
) -> AbstractSdkResult<ModuleRegistry<'a, Self>> {
4043
let vc = self.abstract_registry(deps)?;
4144
Ok(ModuleRegistry {
4245
base: self,
@@ -48,7 +51,7 @@ pub trait ModuleRegistryInterface: AbstractRegistryAccess + ModuleIdentification
4851

4952
impl<T> ModuleRegistryInterface for T where T: AbstractRegistryAccess + ModuleIdentification {}
5053

51-
impl<'a, T: ModuleRegistryInterface> AbstractApi<T> for ModuleRegistry<'a, T> {
54+
impl<T: ModuleRegistryInterface> AbstractApi<T> for ModuleRegistry<'_, T> {
5255
const API_ID: &'static str = "ModuleRegistry";
5356

5457
fn base(&self) -> &T {
@@ -82,7 +85,7 @@ pub struct ModuleRegistry<'a, T: ModuleRegistryInterface> {
8285
registry: RegistryContract,
8386
}
8487

85-
impl<'a, T: ModuleRegistryInterface> ModuleRegistry<'a, T> {
88+
impl<T: ModuleRegistryInterface> ModuleRegistry<'_, T> {
8689
/// Raw query for a module reference
8790
pub fn query_module_reference_raw(
8891
&self,

framework/packages/abstract-sdk/src/base/features/abstract_name_service.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub trait AbstractNameService: Sized {
1818
fn ans_host(&self, deps: Deps) -> AbstractSdkResult<AnsHost>;
1919

2020
/// Construct the name service client.
21-
fn name_service<'a>(&'a self, deps: Deps<'a>) -> AbstractNameServiceClient<Self> {
21+
fn name_service<'a>(&'a self, deps: Deps<'a>) -> AbstractNameServiceClient<'a, Self> {
2222
AbstractNameServiceClient {
2323
base: self,
2424
deps,
@@ -36,8 +36,8 @@ pub struct AbstractNameServiceClient<'a, T: AbstractNameService> {
3636
pub host: AnsHost,
3737
}
3838

39-
impl<'a, T: ModuleIdentification + AbstractNameService> AbstractApi<T>
40-
for AbstractNameServiceClient<'a, T>
39+
impl<T: ModuleIdentification + AbstractNameService> AbstractApi<T>
40+
for AbstractNameServiceClient<'_, T>
4141
{
4242
const API_ID: &'static str = "AbstractNameServiceClient";
4343

@@ -49,7 +49,7 @@ impl<'a, T: ModuleIdentification + AbstractNameService> AbstractApi<T>
4949
}
5050
}
5151

52-
impl<'a, T: ModuleIdentification + AbstractNameService> AbstractNameServiceClient<'a, T> {
52+
impl<T: ModuleIdentification + AbstractNameService> AbstractNameServiceClient<'_, T> {
5353
/// Query ans entry
5454
pub fn query<R: Resolve>(&self, entry: &R) -> AbstractSdkResult<R::Output> {
5555
entry

framework/packages/abstract-std/src/objects/account/account_id.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ impl PrimaryKey<'_> for AccountId {
152152
}
153153
}
154154

155-
impl<'a> Prefixer<'a> for AccountId {
155+
impl Prefixer<'_> for AccountId {
156156
fn prefix(&self) -> Vec<Key> {
157157
self.key()
158158
}

framework/packages/abstract-std/src/objects/account/account_trace.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ impl KeyDeserialize for AccountTrace {
6464
}
6565
}
6666

67-
impl<'a> Prefixer<'a> for AccountTrace {
67+
impl Prefixer<'_> for AccountTrace {
6868
fn prefix(&self) -> Vec<Key> {
6969
self.key()
7070
}

framework/packages/abstract-std/src/objects/entry/asset_entry.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ impl PrimaryKey<'_> for AssetEntry {
9393
}
9494
}
9595

96-
impl<'a> Prefixer<'a> for AssetEntry {
96+
impl Prefixer<'_> for AssetEntry {
9797
fn prefix(&self) -> Vec<Key> {
9898
self.0.prefix()
9999
}

framework/packages/abstract-std/src/objects/entry/channel_entry.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ impl PrimaryKey<'_> for &ChannelEntry {
7373
}
7474
}
7575

76-
impl<'a> Prefixer<'a> for &ChannelEntry {
76+
impl Prefixer<'_> for &ChannelEntry {
7777
fn prefix(&self) -> Vec<Key> {
7878
let mut res = self.connected_chain.str_ref().prefix();
7979
res.extend(self.protocol.prefix());

framework/packages/abstract-std/src/objects/entry/contract_entry.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ impl PrimaryKey<'_> for &ContractEntry {
9797
}
9898
}
9999

100-
impl<'a> Prefixer<'a> for &ContractEntry {
100+
impl Prefixer<'_> for &ContractEntry {
101101
fn prefix(&self) -> Vec<Key> {
102102
let mut res = self.protocol.prefix();
103103
res.extend(self.contract.prefix());

framework/packages/abstract-std/src/objects/entry/dex_asset_pairing.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ impl<'a> PrimaryKey<'a> for &DexAssetPairing {
5858
}
5959
}
6060

61-
impl<'a> Prefixer<'a> for &DexAssetPairing {
61+
impl Prefixer<'_> for &DexAssetPairing {
6262
fn prefix(&self) -> Vec<cw_storage_plus::Key> {
6363
<(AssetEntry, AssetEntry, DexName)>::prefix(&self.0)
6464
}

0 commit comments

Comments
 (0)