From 3fce65de5f6a217b94bd958693c099655dd8a233 Mon Sep 17 00:00:00 2001 From: simke9445 Date: Tue, 16 Jan 2024 00:15:36 +0100 Subject: [PATCH] fix lint --- .../warp-controller/src/execute/controller.rs | 23 +++++-------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/contracts/warp-controller/src/execute/controller.rs b/contracts/warp-controller/src/execute/controller.rs index 344e19d..a7076f3 100644 --- a/contracts/warp-controller/src/execute/controller.rs +++ b/contracts/warp-controller/src/execute/controller.rs @@ -2,7 +2,6 @@ use crate::state::{ACCOUNTS, CONFIG, FINISHED_JOBS, PENDING_JOBS}; use crate::ContractError; use controller::{MigrateAccountsMsg, MigrateJobsMsg, UpdateConfigMsg}; -use controller::job::Job; use cosmwasm_std::{to_binary, DepsMut, Env, MessageInfo, Order, Response, WasmMsg}; use cw_storage_plus::Bound; @@ -137,18 +136,13 @@ pub fn migrate_pending_jobs( .take(msg.limit as usize) .collect(); let job_keys = job_keys?; - for job_key in job_keys { + for job_key in job_keys.clone() { let v1_job = PENDING_JOBS().load(deps.storage, job_key)?; - PENDING_JOBS().save( - deps.storage, - job_key, - &v1_job, - )?; + PENDING_JOBS().save(deps.storage, job_key, &v1_job)?; } - Ok(Response::new() - .add_attribute("refreshed_finished_jobs", job_keys.len().to_string())) + Ok(Response::new().add_attribute("refreshed_finished_jobs", job_keys.len().to_string())) } pub fn migrate_finished_jobs( @@ -170,16 +164,11 @@ pub fn migrate_finished_jobs( .take(msg.limit as usize) .collect(); let job_keys = job_keys?; - for job_key in job_keys { + for job_key in job_keys.clone() { let v1_job = FINISHED_JOBS().load(deps.storage, job_key)?; - FINISHED_JOBS().save( - deps.storage, - job_key, - &v1_job, - )?; + FINISHED_JOBS().save(deps.storage, job_key, &v1_job)?; } - Ok(Response::new() - .add_attribute("refreshed_finished_jobs", job_keys.len().to_string())) + Ok(Response::new().add_attribute("refreshed_finished_jobs", job_keys.len().to_string())) }