From bd6ab8873de1c050ce48dbe04996c22d50db55ae Mon Sep 17 00:00:00 2001 From: gagliardetto Date: Tue, 7 May 2024 13:39:24 +0200 Subject: [PATCH] Fix clippy --- txstatus/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/txstatus/src/lib.rs b/txstatus/src/lib.rs index 27b5d09a..33716a5a 100644 --- a/txstatus/src/lib.rs +++ b/txstatus/src/lib.rs @@ -13,9 +13,9 @@ use solana_transaction_status::parse_instruction::parse; #[no_mangle] pub extern "C" fn parse_instruction(bytes: *const u8, len: usize) -> Response { // let started_at = Instant::now(); - let bytes = unsafe { + let bytes = { assert!(!bytes.is_null()); - slice::from_raw_parts(bytes, len) + unsafe { slice::from_raw_parts(bytes, len) } }; let bytes = bytes.to_vec(); // println!("[rust] params raw bytes: {:?}", bytes);