Skip to content

Commit cbc802f

Browse files
committed
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.
1 parent 910400a commit cbc802f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/builders/module.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ impl ModuleBuilder {
111111
///
112112
/// * `func` - The function to be called when startup is requested.
113113
pub fn request_startup_function(mut self, func: StartupShutdownFunc) -> Self {
114-
self.module.module_startup_func = Some(func);
114+
self.module.request_startup_func = Some(func);
115115
self
116116
}
117117

@@ -121,7 +121,7 @@ impl ModuleBuilder {
121121
///
122122
/// * `func` - The function to be called when shutdown is requested.
123123
pub fn request_shutdown_function(mut self, func: StartupShutdownFunc) -> Self {
124-
self.module.module_shutdown_func = Some(func);
124+
self.module.request_shutdown_func = Some(func);
125125
self
126126
}
127127

0 commit comments

Comments
 (0)