From e51abf509d7040aac768e183a47c966613b67bb7 Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Thu, 29 Sep 2022 22:10:20 -0400 Subject: Fix updated rust api --- rust/examples/template/Cargo.toml | 8 ++++---- rust/examples/template/src/main.rs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'rust/examples') diff --git a/rust/examples/template/Cargo.toml b/rust/examples/template/Cargo.toml index 6a691e3d..37073090 100644 --- a/rust/examples/template/Cargo.toml +++ b/rust/examples/template/Cargo.toml @@ -8,9 +8,9 @@ edition = "2018" # crate-type = ["cdylib"] # You can point at the BinaryNinja dependency in one of two ways, via path: -# [dependencies] -# binaryninja = {path="../../"} +[dependencies] +binaryninja = {path="../../"} # Or directly at the git repo: -[dependencies] -binaryninja = {git = "https://github.com/Vector35/binaryninja-api.git", branch = "dev"} +# [dependencies] +# binaryninja = {git = "https://github.com/Vector35/binaryninja-api.git", branch = "dev"} diff --git a/rust/examples/template/src/main.rs b/rust/examples/template/src/main.rs index 9125aeaa..1fbe3c83 100644 --- a/rust/examples/template/src/main.rs +++ b/rust/examples/template/src/main.rs @@ -13,7 +13,7 @@ fn main() { println!("Loading binary..."); let bv = binaryninja::open_view("/bin/cat").expect("Couldn't open `/bin/cat`"); - println!("Filename: `{}`", bv.metadata().filename()); + println!("Filename: `{}`", bv.file().filename()); println!("File size: `{:#x}`", bv.len()); println!("Function count: {}", bv.functions().len()); -- cgit v1.3.1