From cbc802fbf25688b9d67a93b1a65a7db747205637 Mon Sep 17 00:00:00 2001 From: glyphpoch <26898765+glyphpoch@users.noreply.github.com> Date: Mon, 27 Dec 2021 22:03:34 +0000 Subject: [PATCH] Fix request_(startup|shutdown)_function in ModuleBuilder Request specific builder methods were assigning to the wrong fields, overwriting the MINIT/MSHUTDOWN functions, instead of RINIT/RSHUTDOWN. --- src/builders/module.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/builders/module.rs b/src/builders/module.rs index 12c4b6b398..f4106db846 100644 --- a/src/builders/module.rs +++ b/src/builders/module.rs @@ -111,7 +111,7 @@ impl ModuleBuilder { /// /// * `func` - The function to be called when startup is requested. pub fn request_startup_function(mut self, func: StartupShutdownFunc) -> Self { - self.module.module_startup_func = Some(func); + self.module.request_startup_func = Some(func); self } @@ -121,7 +121,7 @@ impl ModuleBuilder { /// /// * `func` - The function to be called when shutdown is requested. pub fn request_shutdown_function(mut self, func: StartupShutdownFunc) -> Self { - self.module.module_shutdown_func = Some(func); + self.module.request_shutdown_func = Some(func); self }