diff --git a/hercules_opt/src/interprocedural_sroa.rs b/hercules_opt/src/interprocedural_sroa.rs
index 044d35909a78a07948ca8dc387d723b0e01165f3..c7ea58360bf09b2a8e221a19f66a9bfe81126516 100644
--- a/hercules_opt/src/interprocedural_sroa.rs
+++ b/hercules_opt/src/interprocedural_sroa.rs
@@ -1,6 +1,3 @@
-use std::collections::HashMap;
-use std::iter::zip;
-
 use hercules_ir::ir::*;
 
 use crate::*;
@@ -51,24 +48,24 @@ pub fn interprocedural_sroa(
         let mut old_return_type_map = vec![];
         let mut changed = false;
 
-        for ret_typ in param_types.iter() {
-            if !can_sroa_type(editor, *ret_typ) {
+        for par_typ in param_types.iter() {
+            if !can_sroa_type(editor, *par_typ) {
                 old_param_type_map.push(IndexTree::Leaf(new_param_types.len()));
-                new_param_types.push(*ret_typ);
+                new_param_types.push(*par_typ);
             } else {
-                let (types, index) = sroa_type(editor, *ret_typ, new_param_types.len());
+                let (types, index) = sroa_type(editor, *par_typ, new_param_types.len());
                 old_param_type_map.push(index);
                 new_param_types.extend(types);
                 changed = true;
             }
         }
 
-        for par_typ in return_types.iter() {
-            if !can_sroa_type(editor, *par_typ) {
+        for ret_typ in return_types.iter() {
+            if !can_sroa_type(editor, *ret_typ) {
                 old_return_type_map.push(IndexTree::Leaf(new_return_types.len()));
-                new_return_types.push(*par_typ);
+                new_return_types.push(*ret_typ);
             } else {
-                let (types, index) = sroa_type(editor, *par_typ, new_return_types.len());
+                let (types, index) = sroa_type(editor, *ret_typ, new_return_types.len());
                 old_return_type_map.push(index);
                 new_return_types.extend(types);
                 changed = true;