diff --git a/contracts/factory/src/contract.rs b/contracts/factory/src/contract.rs index e54ade73..2337e84e 100644 --- a/contracts/factory/src/contract.rs +++ b/contracts/factory/src/contract.rs @@ -483,8 +483,8 @@ fn query_state(deps: Deps) -> ContractResult { let state = STATE.range(deps.storage, None, None, cosmwasm_std::Order::Ascending); let out = state .collect::>>()? - .iter() - .map(|(k, v): &(String, cosmwasm_std::Addr)| (k.clone(), v.to_string())) + .into_iter() + .map(|(k, v)| (k, v.into_string())) .collect::>(); Ok(to_json_binary(&out)?) } @@ -494,7 +494,7 @@ fn query_locate(deps: Deps, items: Vec) -> ContractResult< for item in items { let addr = STATE.load(deps.storage, &item)?; - contracts.insert(item.clone(), addr.to_string()); + contracts.insert(item, addr.into_string()); } Ok(to_json_binary(&contracts)?) }