Skip to content

Commit 6405576

Browse files
committed
Misc clippy fixes
1 parent 02f6be8 commit 6405576

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

rust/src/hlil/block.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ impl Iterator for HighLevelILBlockIter {
1616
fn next(&mut self) -> Option<Self::Item> {
1717
self.range
1818
.next()
19-
.map(|i| HighLevelInstructionIndex(i))
19+
.map(HighLevelInstructionIndex)
2020
// TODO: Is this already MAPPED>!>?!? If so we map twice that is BAD!!!!
2121
.and_then(|i| self.function.instruction_from_index(i))
2222
}

rust/src/lowlevelil/block.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ where
4242
fn next(&mut self) -> Option<Self::Item> {
4343
self.range
4444
.next()
45-
.map(|idx| LowLevelInstructionIndex(idx))
45+
.map(LowLevelInstructionIndex)
4646
.and_then(|idx| self.function.instruction_from_index(idx))
4747
}
4848
}

rust/src/mlil/block.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ impl Iterator for MediumLevelILBlockIter {
5555
fn next(&mut self) -> Option<Self::Item> {
5656
self.range
5757
.next()
58-
.map(|i| MediumLevelInstructionIndex(i))
58+
.map(MediumLevelInstructionIndex)
5959
// TODO: What if this is already mapped!?!?!? we will map twice!?!?!?
6060
.and_then(|i| self.function.instruction_from_index(i))
6161
}

rust/src/operand_iter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ impl<F: ILFunction + RefCountable> Iterator for OperandExprIter<F> {
188188
fn next(&mut self) -> Option<Self::Item> {
189189
self.0
190190
.next()
191-
.map(|i| F::InstructionIndex::from(i))
191+
.map(F::InstructionIndex::from)
192192
.map(|idx| self.0.function.il_instruction_from_index(idx))
193193
}
194194
}

0 commit comments

Comments
 (0)