From 0e937ac07bf857dc0ceaeaf8667fb26bd734ea40 Mon Sep 17 00:00:00 2001 From: s1341 Date: Wed, 30 Oct 2024 09:28:51 +0200 Subject: [PATCH] Module: get rid of 'static lifetime on Gum reference --- frida-gum/src/module.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frida-gum/src/module.rs b/frida-gum/src/module.rs index fc8a38a..21f368b 100644 --- a/frida-gum/src/module.rs +++ b/frida-gum/src/module.rs @@ -56,16 +56,16 @@ pub struct ModuleDetailsOwned { pub size: usize, } -pub struct Module { +pub struct Module<'a> { // This is to verify that Gum is initialized before using any Module methods which requires // intialization. // Note that Gum is expected to be initialized via OnceCell which provides &Gum for every // instance. - _gum: &'static Gum, + _gum: &'a Gum, } -impl Module { - pub fn obtain(gum: &'static Gum) -> Module { +impl<'a> Module<'a> { + pub fn obtain(gum: &Gum) -> Module { Module { _gum: gum } }