summaryrefslogtreecommitdiff
path: root/rust/src/llil/instruction.rs
diff options
context:
space:
mode:
authorRusty Wagner <rusty.wagner@gmail.com>2023-12-22 16:44:34 -0700
committerRusty Wagner <rusty.wagner@gmail.com>2024-01-04 11:02:14 -0700
commita82a2105fd1b1a99bddb835ed1d9dbf2e2a5c56f (patch)
treecbf61cb01a6d2b1102a2465132d2d2df22ba3900 /rust/src/llil/instruction.rs
parent80b07dfa158bb093cc93e602363655b62ae595f8 (diff)
Use unwrap_or_else to avoid running error path code when there isn't an error
Diffstat (limited to 'rust/src/llil/instruction.rs')
-rw-r--r--rust/src/llil/instruction.rs2
1 files changed, 1 insertions, 1 deletions
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.