From a82a2105fd1b1a99bddb835ed1d9dbf2e2a5c56f Mon Sep 17 00:00:00 2001 From: Rusty Wagner Date: Fri, 22 Dec 2023 16:44:34 -0700 Subject: Use unwrap_or_else to avoid running error path code when there isn't an error --- rust/src/llil/instruction.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rust/src/llil/instruction.rs') diff --git a/rust/src/llil/instruction.rs b/rust/src/llil/instruction.rs index 36733472..ab02b175 100644 --- a/rust/src/llil/instruction.rs +++ b/rust/src/llil/instruction.rs @@ -115,7 +115,7 @@ where LLIL_SYSCALL => InstrInfo::Syscall(Operation::new(self.function, op)), LLIL_INTRINSIC => InstrInfo::Intrinsic(Operation::new(self.function, op)), _ => { - common_info(self.function, op).unwrap_or({ + common_info(self.function, op).unwrap_or_else(|| { // 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. -- cgit v1.3.1