summaryrefslogtreecommitdiff
path: root/rust/src/llil/instruction.rs
diff options
context:
space:
mode:
authorMichael Krasnitski <michael.krasnitski@gmail.com>2023-01-06 02:21:40 -0500
committerKyle Martin <krm504@nyu.edu>2023-01-10 00:11:27 -0500
commit64713cd5b5550c5b8c61a05cc26d89d464d45bb3 (patch)
tree3fc035eab9b9ee91a953ca804aa5298aa5a5c895 /rust/src/llil/instruction.rs
parent5b51a4ff188c426d8f90ac71ee6dde0fa3b5a495 (diff)
Introduce `Expression::new` to avoid writing `PhantomData` everywhere
Diffstat (limited to 'rust/src/llil/instruction.rs')
-rw-r--r--rust/src/llil/instruction.rs8
1 files changed, 1 insertions, 7 deletions
diff --git a/rust/src/llil/instruction.rs b/rust/src/llil/instruction.rs
index 20cc545b..e5ae508b 100644
--- a/rust/src/llil/instruction.rs
+++ b/rust/src/llil/instruction.rs
@@ -16,8 +16,6 @@ use binaryninjacore_sys::BNGetLowLevelILByIndex;
use binaryninjacore_sys::BNGetLowLevelILIndexForInstruction;
use binaryninjacore_sys::BNLowLevelILInstruction;
-use std::marker::PhantomData;
-
use super::operation;
use super::operation::Operation;
use super::*;
@@ -119,11 +117,7 @@ where
// Hopefully this is a bare value. If it isn't (expression
// from wrong function form or similar) it won't really cause
// any problems as it'll come back as undefined when queried.
- let expr = Expression {
- function: self.function,
- expr_idx,
- _ty: PhantomData,
- };
+ let expr = Expression::new(self.function, expr_idx);
let info = unsafe { expr.info_from_op(op) };