From 0da651881787922965071f92706a53b84a9be30a Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Thu, 20 Jul 2023 16:42:31 +0100 Subject: [PATCH] client: Fix beta clippy issue (unnecessary_cast) warning: casting raw pointers to the same type and constness is unnecessary (`*const u8` -> `*const u8`) --> src/lib.rs:603:28 | 603 | let cap_data_ptr = cap_data.as_ptr() as *const u8; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cap_data.as_ptr()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast = note: `#[warn(clippy::unnecessary_cast)]` on by default Signed-off-by: Rob Bradford --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index ab6e822..e483f1d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -600,7 +600,7 @@ impl Client { let mmap_cap_size = size_of::() as u32; let mmap_area_size = size_of::() as u32; - let cap_data_ptr = cap_data.as_ptr() as *const u8; + let cap_data_ptr = cap_data.as_ptr(); let mut region_info_offset = region_info.cap_offset; while region_info_offset != 0 { // calculate the offset from the begining of the cap_data based on the offset