From 29b62677dad48aa4d55ad2dae5d176d9880216bd Mon Sep 17 00:00:00 2001 From: Michael Krasnitski Date: Tue, 16 Apr 2024 19:32:04 -0400 Subject: Fix clippy warnings and run rustfmt --- rust/src/lib.rs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'rust/src/lib.rs') diff --git a/rust/src/lib.rs b/rust/src/lib.rs index 0d385746..739bfbf6 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -74,16 +74,12 @@ //! ### `main.rs` //! Standalone binaries need to initialize Binary Ninja before they can work. You can do this through [`headless::Session`], [`headless::script_helper`], or [`headless::init()`] at start and [`headless::shutdown()`] at shutdown. //! ```rust -//! fn main() { -//! // This loads all the core architecture, platform, etc plugins -//! // Standalone executables need to call this, but plugins do not -//! let headless_session = binaryninja::headless::Session::new(); +//! // This loads all the core architecture, platform, etc plugins +//! // Standalone executables need to call this, but plugins do not +//! let headless_session = binaryninja::headless::Session::new(); //! -//! println!("Loading binary..."); -//! let bv = headless_session.load("/bin/cat").expect("Couldn't open `/bin/cat`"); -//! -//! // Your code here... -//! } +//! println!("Loading binary..."); +//! let bv = headless_session.load("/bin/cat").expect("Couldn't open `/bin/cat`"); //! ``` //! //! ### `Cargo.toml` -- cgit v1.3.1