diff options
Diffstat (limited to 'mingling_core/src')
| -rw-r--r-- | mingling_core/src/program/setup.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/mingling_core/src/program/setup.rs b/mingling_core/src/program/setup.rs index 0fe8070..fa9d0eb 100644 --- a/mingling_core/src/program/setup.rs +++ b/mingling_core/src/program/setup.rs @@ -4,7 +4,7 @@ pub trait ProgramSetup<C> where C: ProgramCollect<Enum = C>, { - fn setup(&mut self, program: &mut Program<C>); + fn setup(self, program: &mut Program<C>); } impl<C> Program<C> @@ -12,8 +12,7 @@ where C: ProgramCollect<Enum = C>, { /// Load and execute init logic - pub fn with_setup<S: ProgramSetup<C> + 'static>(&mut self, mut setup: S) -> S { - S::setup(&mut setup, self); - setup + pub fn with_setup<S: ProgramSetup<C> + 'static>(&mut self, setup: S) { + S::setup(setup, self); } } |
