Skip to content

Commit

Permalink
Module: get rid of 'static lifetime on Gum reference
Browse files Browse the repository at this point in the history
  • Loading branch information
s1341 committed Oct 30, 2024
1 parent 3019cf4 commit 0e937ac
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frida-gum/src/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
}

Expand Down

0 comments on commit 0e937ac

Please sign in to comment.