Skip to content

Commit e2682af

Browse files
committed
Fix clippy warnings on android
1 parent 73ab012 commit e2682af

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

inline_hook/src/aarch64_linux_android.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ extern "C" {
66
fn A64HookFunction(symbol: *const c_void, replace: *const c_void, result: *mut *mut c_void);
77
}
88

9-
/// A function hook specific to ARMv8 Android
9+
/// A function hook specific to `ARMv8` Android
1010
#[derive(Debug)]
1111
pub struct Hook {
1212
original: AtomicPtr<c_void>,
@@ -26,11 +26,9 @@ impl Hook {
2626
/// # Safety
2727
/// `target` and `hook` must have the same signature and calling convention
2828
pub unsafe fn install(&self, target: *const (), hook: *const ()) -> bool {
29-
let target = target as *const c_void;
30-
let hook = hook as *const c_void;
3129
let mut original: *mut c_void = null_mut();
3230

33-
A64HookFunction(target, hook, &mut original);
31+
A64HookFunction(target.cast(), hook.cast(), &mut original);
3432

3533
self.original.store(original, Ordering::SeqCst);
3634
true

inline_hook/src/armv7_linux_androideabi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ extern "C" {
77
fn inlineHook(target_addr: u32) -> c_int;
88
}
99

10-
/// A function hook specific to ARMv7 Android
10+
/// A function hook specific to `ARMv7` Android
1111
#[derive(Debug)]
1212
pub struct Hook {
1313
original: AtomicPtr<u32>,

0 commit comments

Comments
 (0)