Merge pull request #119 from glyphpoch/fix_request_start_shutdown_funcs

Fix request_(startup|shutdown)_function in ModuleBuilder
This commit is contained in:
Torsten Dittmann 2022-01-13 23:49:24 +01:00 committed by GitHub
commit 32e2af0ba5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
}