Skip to content

Rust binding for LLVM MC disassembler #555

Rust binding for LLVM MC disassembler

Rust binding for LLVM MC disassembler #555

Triggered via push May 22, 2025 19:41
Status Failure
Total duration 48s
Artifacts 1

rust.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

5 errors and 3 warnings
cargo fmt
Process completed with exit code 1.
cargo clippy
Error: Clippy has exited with exit code 101
casting to the same type is unnecessary (`usize` -> `usize`): rust/src/llvm.rs#L13
error: casting to the same type is unnecessary (`usize` -> `usize`) --> rust/src/llvm.rs:13:13 | 13 | buf.len() as usize, | ^^^^^^^^^^^^^^^^^^ help: try: `buf.len()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u64` -> `u64`): rust/src/llvm.rs#L11
error: casting to the same type is unnecessary (`u64` -> `u64`) --> rust/src/llvm.rs:11:13 | 11 | address64 as u64, | ^^^^^^^^^^^^^^^^ help: try: `address64` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast = note: `-D clippy::unnecessary-cast` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::unnecessary_cast)]`
unneeded `return` statement: rust/src/llvm.rs#L5
error: unneeded `return` statement --> rust/src/llvm.rs:5:5 | 5 | / return unsafe { 6 | | let mut buf = vec![0; 256]; 7 | | let instr_len = BNLlvmServicesDisasmInstruction( 8 | | triplet.as_ptr() as *const i8, ... | 21 | | } 22 | | }; | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return = note: `-D clippy::needless-return` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::needless_return)]` help: remove `return` | 5 ~ unsafe { 6 + let mut buf = vec![0; 256]; 7 + let instr_len = BNLlvmServicesDisasmInstruction( 8 + triplet.as_ptr() as *const i8, 9 + data.as_ptr() as *mut u8, 10 + data.len() as i32, 11 + address64 as u64, 12 + buf.as_mut_ptr() as *mut i8, 13 + buf.len() as usize, 14 + ); 15 + if instr_len > 0 { 16 + let cstr = CStr::from_ptr(buf.as_ptr() as *const i8); 17 + let string = cstr.to_str().unwrap().to_string(); 18 + Some((instr_len as usize, string)) 19 + } else { 20 + None 21 + } 22 ~ } |
cargo fmt: rust/src/lib.rs#L89
Diff in /home/runner/work/binaryninja-api/binaryninja-api/rust/src/lib.rs
cargo fmt: rust/src/lib.rs#L57
Diff in /home/runner/work/binaryninja-api/binaryninja-api/rust/src/lib.rs
licensing
New version for cargo-about available: 0.7.1

Artifacts

Produced during runtime
Name Size Digest
license Expired
22.5 KB
sha256:6af2cd1b0b585c8268b340fefd8ce0bdb740b30eb98d46ebc93a1dc7cea687eb