From 5c8e8234b1405c1f96c28e4de4c2365a994c47bc Mon Sep 17 00:00:00 2001 From: Rubens Brandao Date: Tue, 4 Jun 2024 12:02:55 -0300 Subject: [PATCH] fix doc --- rust/src/mlil/function.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/rust/src/mlil/function.rs b/rust/src/mlil/function.rs index 8c3ce3e23..ffcc1d819 100644 --- a/rust/src/mlil/function.rs +++ b/rust/src/mlil/function.rs @@ -188,10 +188,9 @@ impl MediumLevelILFunction { /// # use binaryninja::mlil::MediumLevelILFunction; /// # use binaryninja::types::PossibleValueSet; /// # let mlil_fun: MediumLevelILFunction = todo!(); - /// let (mlil_var, arch_addr, _val) = mlil_fun.user_var_values().all().next().unwrap(); - /// let def_address = arch_addr.address; + /// let var_val = mlil_fun.user_var_values().get(0); /// let var_value = PossibleValueSet::ConstantValue{value: 5}; - /// mlil_fun.set_user_var_value(&mlil_var, def_address, var_value).unwrap(); + /// mlil_fun.set_user_var_value(&var_val.var, var_val.def_site.address, var_value).unwrap(); /// ``` pub fn set_user_var_value( &self,