Skip to content

Commit 89e0d48

Browse files
committed
Clean up more clippy warnings (rust 1.75)
1 parent e8a8516 commit 89e0d48

File tree

7 files changed

+9
-8
lines changed

7 files changed

+9
-8
lines changed

contracts/consumer/converter/src/ibc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ pub fn ibc_packet_receive(
188188
_env: Env,
189189
msg: IbcPacketReceiveMsg,
190190
) -> Result<IbcReceiveResponse, ContractError> {
191-
let packet: ProviderPacket = from_json(&msg.packet.data)?;
191+
let packet: ProviderPacket = from_json(msg.packet.data)?;
192192
let contract = ConverterContract::new();
193193
let res = match packet {
194194
ProviderPacket::Stake {

contracts/consumer/remote-price-feed/src/ibc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ pub fn ibc_packet_ack(
125125
_env: Env,
126126
msg: IbcPacketAckMsg,
127127
) -> Result<IbcBasicResponse, ContractError> {
128-
let ack: PriceFeedProviderAck = from_json(&msg.acknowledgement.data)?;
128+
let ack: PriceFeedProviderAck = from_json(msg.acknowledgement.data)?;
129129
let PriceFeedProviderAck::Update { time, twap } = ack;
130130
let contract = RemotePriceFeedContract::new();
131131
contract.update_twap(deps, time, twap)?;

contracts/osmosis-price-provider/src/ibc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ pub fn ibc_packet_receive(
124124
pool_id,
125125
base_asset,
126126
quote_asset,
127-
} = from_json(&msg.packet.data)?;
127+
} = from_json(msg.packet.data)?;
128128
let contract = OsmosisPriceProvider::new();
129129

130130
let time = env.block.time;

contracts/provider/external-staking/src/contract.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,6 +865,7 @@ impl ExternalStakingContract<'_> {
865865
/// In test code, this is called from `test_handle_slashing`.
866866
/// In non-test code, this is being called from `ibc_packet_receive` (in the `ConsumerPacket::RemoveValidators`
867867
/// handler)
868+
#[allow(clippy::too_many_arguments)]
868869
pub(crate) fn handle_slashing(
869870
&self,
870871
env: &Env,
@@ -1236,7 +1237,7 @@ pub mod cross_staking {
12361237
let owner = ctx.deps.api.addr_validate(&owner)?;
12371238

12381239
// parse and validate message
1239-
let msg: ReceiveVirtualStake = from_json(&msg)?;
1240+
let msg: ReceiveVirtualStake = from_json(msg)?;
12401241
if !self
12411242
.val_set
12421243
.is_active_validator(ctx.deps.storage, &msg.validator)?

contracts/provider/external-staking/src/ibc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ pub fn ibc_packet_receive(
123123
// If a validator is in more than one of the events, the end result will depend on the
124124
// processing order below.
125125
let contract = ExternalStakingContract::new();
126-
let packet: ConsumerPacket = from_json(&msg.packet.data)?;
126+
let packet: ConsumerPacket = from_json(msg.packet.data)?;
127127
let resp = match packet {
128128
ConsumerPacket::ValsetUpdate {
129129
height,
@@ -251,7 +251,7 @@ pub fn ibc_packet_timeout(
251251
_env: Env,
252252
msg: IbcPacketTimeoutMsg,
253253
) -> Result<IbcBasicResponse, ContractError> {
254-
let packet: ProviderPacket = from_json(&msg.packet.data)?;
254+
let packet: ProviderPacket = from_json(msg.packet.data)?;
255255
let contract = ExternalStakingContract::new();
256256
let mut resp = IbcBasicResponse::new().add_attribute("action", "ibc_packet_timeout");
257257
match packet {

contracts/provider/native-staking/src/contract.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ impl NativeStakingContract<'_> {
200200
// Associate staking proxy with owner address
201201
let proxy_addr = Addr::unchecked(init_data.contract_address);
202202
let owner_data: OwnerMsg =
203-
from_json(&init_data.data.ok_or(ContractError::NoInstantiateData {})?)?;
203+
from_json(init_data.data.ok_or(ContractError::NoInstantiateData {})?)?;
204204
let owner_addr = deps.api.addr_validate(&owner_data.owner)?;
205205
self.proxy_by_owner
206206
.save(deps.storage, &owner_addr, &proxy_addr)?;

contracts/provider/native-staking/src/local_staking_api.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ impl LocalStakingApi for NativeStakingContract<'_> {
3737
let _paid = must_pay(&ctx.info, &cfg.denom)?;
3838

3939
// Parse message to find validator to stake on
40-
let StakeMsg { validator } = from_json(&msg)?;
40+
let StakeMsg { validator } = from_json(msg)?;
4141

4242
let owner_addr = ctx.deps.api.addr_validate(&owner)?;
4343

0 commit comments

Comments
 (0)