diff --git a/rust/binaryninjacore-sys/build.rs b/rust/binaryninjacore-sys/build.rs index 26ab55df2..800b8373f 100644 --- a/rust/binaryninjacore-sys/build.rs +++ b/rust/binaryninjacore-sys/build.rs @@ -63,11 +63,7 @@ fn main() { // Make a symlink "libbinaryninjacore.so" pointing to "libbinaryninjacore.so.1" if symlink_target.exists() && symlink_source.symlink_metadata().is_err() { use std::os::unix::fs; - fs::symlink( - symlink_target, - symlink_source, - ) - .expect("failed to create required symlink"); + fs::symlink(symlink_target, symlink_source).expect("failed to create required symlink"); } println!("cargo:rustc-link-search={}", out_dir); } diff --git a/rust/src/disassembly.rs b/rust/src/disassembly.rs index b34a01c6a..2a4db4f68 100644 --- a/rust/src/disassembly.rs +++ b/rust/src/disassembly.rs @@ -254,7 +254,7 @@ impl InstructionTextToken { kind, } } - + pub(crate) unsafe fn free_raw(raw: BNInstructionTextToken) { if !raw.text.is_null() { BNFreeString(raw.text); diff --git a/rust/src/typeprinter.rs b/rust/src/typeprinter.rs index 0f109e1d5..ffbd0d06e 100644 --- a/rust/src/typeprinter.rs +++ b/rust/src/typeprinter.rs @@ -594,7 +594,7 @@ impl From for BNTypeDefinitionLine { // NOTE: This is leaking tokens. Must free with `cb_free_lines`. tokens: Box::leak(tokens).as_mut_ptr(), // NOTE: This is leaking a ref to ty. Must free with `cb_free_lines`. - type_: unsafe { BNNewTypeReference(value.ty.handle) }, + type_: unsafe { BNNewTypeReference(value.ty.handle) }, // NOTE: This is leaking a ref to parent_type. Must free with `cb_free_lines`. parentType: value .parent_type