From a3b75b7eeae5e7a0c53b6167bafb75a85fa6d9ce Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Tue, 21 Jul 2026 03:58:44 +0800 Subject: feat(core): return `&mut Self` from builder methods Enables method chaining for `with_resource`, `with_dispatcher`, `with_dispatchers`, `with_hook`, and `with_setup` --- mingling_core/src/program/setup.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mingling_core/src/program/setup.rs') diff --git a/mingling_core/src/program/setup.rs b/mingling_core/src/program/setup.rs index 838c29a..a8ff114 100644 --- a/mingling_core/src/program/setup.rs +++ b/mingling_core/src/program/setup.rs @@ -29,8 +29,9 @@ where C: ProgramCollect, { /// Load and execute init logic - pub fn with_setup + 'static>(&mut self, setup: S) { + pub fn with_setup + 'static>(&mut self, setup: S) -> &mut Self { S::setup(setup, self); + self } } -- cgit