diff options
| author | Rubens Brandao <git@rubens.io> | 2024-04-17 12:35:04 -0300 |
|---|---|---|
| committer | Kyle Martin <krm504@nyu.edu> | 2024-05-09 14:00:01 -0400 |
| commit | c528f3ad0e1abd4168b1507e8c30bc14c4a6a736 (patch) | |
| tree | 83d13b9b64be9383929e755efa97fd4877b5f2ec /rust/src/headless.rs | |
| parent | 71a1c7e162046a44e7640e468b69a2b59599b198 (diff) | |
fix rust doc code
Diffstat (limited to 'rust/src/headless.rs')
| -rw-r--r-- | rust/src/headless.rs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/rust/src/headless.rs b/rust/src/headless.rs index e4024d8e..740c3dc6 100644 --- a/rust/src/headless.rs +++ b/rust/src/headless.rs @@ -101,12 +101,13 @@ pub fn shutdown() { } /// Prelued-postlued helper function (calls [`init`] and [`shutdown`] for you) -/// ```rust +/// ```no_run +/// # use binaryninja::binaryview::BinaryViewExt; /// binaryninja::headless::script_helper(|| { -/// binaryninja::load("/bin/cat") -/// .expect("Couldn't open `/bin/cat`") -/// .iter() -/// .for_each(|func| println!(" `{}`", func.symbol().full_name())); +/// let cat = binaryninja::load("/bin/cat").expect("Couldn't open `/bin/cat`"); +/// for function in cat.functions().iter() { +/// println!(" `{}`", function.symbol().full_name()); +/// } /// }); /// ``` pub fn script_helper(func: fn()) { @@ -124,7 +125,7 @@ impl Session { Self {} } - /// ```rust + /// ```no_run /// let headless_session = binaryninja::headless::Session::new(); /// /// let bv = headless_session.load("/bin/cat").expect("Couldn't open `/bin/cat`"); @@ -133,7 +134,7 @@ impl Session { crate::load(filename) } - /// ```rust + /// ```no_run /// let settings = [("analysis.linearSweep.autorun", false)].into(); /// let headless_session = binaryninja::headless::Session::new(); /// |
