Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
simke9445 committed Nov 6, 2023
1 parent 8a8ff7e commit d7a01fc
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions contracts/warp-controller/src/execute/job.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ pub fn delete_job(

// Job owner withdraw all assets that are listed from warp account to itself
msgs.push(build_account_withdraw_assets_msg(
job_account_addr.clone().to_string(),
job_account_addr.to_string(),
job.assets_to_withdraw,
));

Expand Down Expand Up @@ -332,7 +332,7 @@ pub fn update_job(
return Err(ContractError::NameTooShort {});
}

let job = JobQueue::update(&mut deps, env.clone(), data)?;
let job = JobQueue::update(&mut deps, env, data)?;

let fee = compute_burn_fee(added_reward, &config);

Expand Down Expand Up @@ -489,7 +489,7 @@ pub fn evict_job(
let account_amount = deps
.querier
.query::<BalanceResponse>(&QueryRequest::Bank(BankQuery::Balance {
address: job_account_addr.clone().to_string(),
address: job_account_addr.to_string(),
denom: config.fee_denom.clone(),
}))?
.amount
Expand Down
2 changes: 1 addition & 1 deletion contracts/warp-controller/src/reply/job.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ pub fn execute_job(
&resolver::QueryMsg::QueryApplyVarFn(resolver::QueryApplyVarFnMsg {
vars: finished_job.vars,
status: finished_job.status.clone(),
warp_account_addr: Some(finished_job.account.clone().to_string()),
warp_account_addr: Some(finished_job.account.to_string()),
}),
)?;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ mod tests {
// Query taken accounts
assert_eq!(
app.wrap().query_wasm_smart(
warp_job_account_tracker_contract_addr.clone(),
warp_job_account_tracker_contract_addr,
&QueryMsg::QueryTakenAccounts(QueryTakenAccountsMsg {
account_owner_addr: USER_1.to_string(),
start_after: None,
Expand Down
8 changes: 4 additions & 4 deletions contracts/warp-resolver/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ fn test_hydrate_static_nested_vars_and_hydrate_msgs() {
name: "var3".to_string(),
kind: VariableKind::String,
value: None,
init_fn: FnValue::String(StringValue::Simple(json_str.clone())),
init_fn: FnValue::String(StringValue::Simple(json_str)),
reinitialize: false,
update_fn: None,
// when encode is true, value will be base64 encoded after msgs hydration
Expand Down Expand Up @@ -486,7 +486,7 @@ fn test_hydrate_static_env_vars_and_hydrate_msgs() {
name: "var2".to_string(),
kind: VariableKind::Uint,
value: None,
init_fn: FnValue::Uint(NumValue::Simple(Uint256::from(100 as u64))),
init_fn: FnValue::Uint(NumValue::Simple(Uint256::from(100_u64))),
reinitialize: false,
update_fn: None,
encode: false,
Expand All @@ -496,7 +496,7 @@ fn test_hydrate_static_env_vars_and_hydrate_msgs() {
name: "var3".to_string(),
kind: VariableKind::String,
value: None,
init_fn: FnValue::String(StringValue::Simple(json_str.clone())),
init_fn: FnValue::String(StringValue::Simple(json_str)),
reinitialize: false,
update_fn: None,
encode: true,
Expand Down Expand Up @@ -548,7 +548,7 @@ fn test_hydrate_static_env_vars_and_hydrate_msgs() {
Variable::Static(static_var) => {
assert_eq!(
String::from_utf8(static_var.value.unwrap_or_default().into()).unwrap(),
dummy_warp_account_addr.clone()
dummy_warp_account_addr
)
}
_ => panic!("Expected static variable"),
Expand Down

0 comments on commit d7a01fc

Please sign in to comment.