From 64713cd5b5550c5b8c61a05cc26d89d464d45bb3 Mon Sep 17 00:00:00 2001 From: Michael Krasnitski Date: Fri, 6 Jan 2023 02:21:40 -0500 Subject: Introduce `Expression::new` to avoid writing `PhantomData` everywhere --- rust/src/llil/instruction.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'rust/src/llil/instruction.rs') 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) }; -- cgit v1.3.1