diff --git a/rust/src/hlil/block.rs b/rust/src/hlil/block.rs index 8b5a000c0..a82f3e121 100644 --- a/rust/src/hlil/block.rs +++ b/rust/src/hlil/block.rs @@ -16,7 +16,7 @@ impl Iterator for HighLevelILBlockIter { fn next(&mut self) -> Option { self.range .next() - .map(|i| HighLevelInstructionIndex(i)) + .map(HighLevelInstructionIndex) // TODO: Is this already MAPPED>!>?!? If so we map twice that is BAD!!!! .and_then(|i| self.function.instruction_from_index(i)) } diff --git a/rust/src/lowlevelil/block.rs b/rust/src/lowlevelil/block.rs index 0dc6eccb8..51a732d05 100644 --- a/rust/src/lowlevelil/block.rs +++ b/rust/src/lowlevelil/block.rs @@ -42,7 +42,7 @@ where fn next(&mut self) -> Option { self.range .next() - .map(|idx| LowLevelInstructionIndex(idx)) + .map(LowLevelInstructionIndex) .and_then(|idx| self.function.instruction_from_index(idx)) } } diff --git a/rust/src/mlil/block.rs b/rust/src/mlil/block.rs index 219fa0a4a..c3fa18b08 100644 --- a/rust/src/mlil/block.rs +++ b/rust/src/mlil/block.rs @@ -55,7 +55,7 @@ impl Iterator for MediumLevelILBlockIter { fn next(&mut self) -> Option { self.range .next() - .map(|i| MediumLevelInstructionIndex(i)) + .map(MediumLevelInstructionIndex) // TODO: What if this is already mapped!?!?!? we will map twice!?!?!? .and_then(|i| self.function.instruction_from_index(i)) } diff --git a/rust/src/operand_iter.rs b/rust/src/operand_iter.rs index 115cb5368..680ccb241 100644 --- a/rust/src/operand_iter.rs +++ b/rust/src/operand_iter.rs @@ -188,7 +188,7 @@ impl Iterator for OperandExprIter { fn next(&mut self) -> Option { self.0 .next() - .map(|i| F::InstructionIndex::from(i)) + .map(F::InstructionIndex::from) .map(|idx| self.0.function.il_instruction_from_index(idx)) } }