diff --git a/contracts/warp-controller/src/execute/job.rs b/contracts/warp-controller/src/execute/job.rs index 7d100d4e..f289b5da 100644 --- a/contracts/warp-controller/src/execute/job.rs +++ b/contracts/warp-controller/src/execute/job.rs @@ -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, )); @@ -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); @@ -489,7 +489,7 @@ pub fn evict_job( let account_amount = deps .querier .query::(&QueryRequest::Bank(BankQuery::Balance { - address: job_account_addr.clone().to_string(), + address: job_account_addr.to_string(), denom: config.fee_denom.clone(), }))? .amount diff --git a/contracts/warp-controller/src/reply/job.rs b/contracts/warp-controller/src/reply/job.rs index 03dd0ad9..c5648bcf 100644 --- a/contracts/warp-controller/src/reply/job.rs +++ b/contracts/warp-controller/src/reply/job.rs @@ -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()), }), )?; diff --git a/contracts/warp-job-account-tracker/src/integration_tests.rs b/contracts/warp-job-account-tracker/src/integration_tests.rs index 0d6dc961..78c65da4 100644 --- a/contracts/warp-job-account-tracker/src/integration_tests.rs +++ b/contracts/warp-job-account-tracker/src/integration_tests.rs @@ -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, diff --git a/contracts/warp-resolver/src/tests.rs b/contracts/warp-resolver/src/tests.rs index f52a782f..3ef11a61 100644 --- a/contracts/warp-resolver/src/tests.rs +++ b/contracts/warp-resolver/src/tests.rs @@ -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 @@ -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, @@ -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, @@ -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"),