From 4f7a9fd830a4edf9c2c23df6fdff720240cf5e88 Mon Sep 17 00:00:00 2001 From: Elazar Leibovich Date: Tue, 29 Oct 2024 13:04:43 +0200 Subject: [PATCH] frida-gum: clippy --- frida-gum/src/module.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/frida-gum/src/module.rs b/frida-gum/src/module.rs index 66d145c..fc8a38a 100644 --- a/frida-gum/src/module.rs +++ b/frida-gum/src/module.rs @@ -72,7 +72,7 @@ impl Module { /// The absolute address of the export. In the event that no such export /// could be found, returns NULL. pub fn find_export_by_name( - self: &Self, + &self, module_name: Option<&str>, symbol_name: &str, ) -> Option { @@ -104,7 +104,7 @@ impl Module { /// The absolute address of the symbol. In the event that no such symbol /// could be found, returns NULL. pub fn find_symbol_by_name( - self: &Self, + &self, module_name: &str, symbol_name: &str, ) -> Option { @@ -127,7 +127,7 @@ impl Module { /// Returns the base address of the specified module. In the event that no /// such module could be found, returns NULL. - pub fn find_base_address(self: &Self, module_name: &str) -> NativePointer { + pub fn find_base_address(&self, module_name: &str) -> NativePointer { let module_name = CString::new(module_name).unwrap(); unsafe { @@ -139,7 +139,7 @@ impl Module { /// Enumerates memory ranges satisfying protection given. pub fn enumerate_ranges( - self: &Self, + &self, module_name: &str, prot: PageProtection, callout: impl FnMut(RangeDetails) -> bool, @@ -163,7 +163,7 @@ impl Module { } /// Enumerates modules. - pub fn enumerate_modules(self: &Self) -> Vec { + pub fn enumerate_modules(&self) -> Vec { let result: Vec = vec![]; unsafe extern "C" fn callback( @@ -203,7 +203,7 @@ impl Module { } /// Enumerates exports in module. - pub fn enumerate_exports(self: &Self, module_name: &str) -> Vec { + pub fn enumerate_exports(&self, module_name: &str) -> Vec { let result: Vec = vec![]; unsafe extern "C" fn callback( @@ -235,7 +235,7 @@ impl Module { } /// Enumerates symbols in module. - pub fn enumerate_symbols(self: &Self, module_name: &str) -> Vec { + pub fn enumerate_symbols(&self, module_name: &str) -> Vec { let result: Vec = vec![]; unsafe extern "C" fn callback( details: *const GumSymbolDetails,