aboutsummaryrefslogtreecommitdiff
path: root/mingling_core/src/program/setup.rs
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-04-25 19:02:17 +0800
committer魏曹先生 <1992414357@qq.com>2026-04-25 19:02:17 +0800
commitd4634b01e3f33b3ee52b1501f5ade739a1796d08 (patch)
tree778b229f78be7ec67367e8135d0dcc6b1fff5158 /mingling_core/src/program/setup.rs
parent1d9a65ae06faf4a6329eb07e8c1deab3811c782b (diff)
Remove redundant generic parameter from Program struct
Diffstat (limited to 'mingling_core/src/program/setup.rs')
-rw-r--r--mingling_core/src/program/setup.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/mingling_core/src/program/setup.rs b/mingling_core/src/program/setup.rs
index f095ed3..86228b9 100644
--- a/mingling_core/src/program/setup.rs
+++ b/mingling_core/src/program/setup.rs
@@ -8,19 +8,19 @@ mod general_renderer;
#[cfg(feature = "general_renderer")]
pub use general_renderer::*;
-pub trait ProgramSetup<C, G>
+pub trait ProgramSetup<C>
where
C: ProgramCollect,
{
- fn setup(&mut self, program: &mut Program<C, G>);
+ fn setup(&mut self, program: &mut Program<C>);
}
-impl<C, G> Program<C, G>
+impl<C> Program<C>
where
C: ProgramCollect,
{
/// Load and execute init logic
- pub fn with_setup<S: ProgramSetup<C, G> + 'static>(&mut self, mut setup: S) -> S {
+ pub fn with_setup<S: ProgramSetup<C> + 'static>(&mut self, mut setup: S) -> S {
S::setup(&mut setup, self);
setup
}