From 91e4c6fbce8060b4cb35fbc4ec7531410692f092 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 29 Nov 2026 09:10:42 -0800 Subject: [PATCH] Engine: end_folder no longer warns about unused s and turn on wasm32 end_folder uses its Session and StoreTurn only in the native arm that finishes loaded modules and saves the disabled list. The wasm32 build has no such arm, so rustc reported both parameters as unused there. The function now marks them used under cfg(target_arch = "wasm32"), as install_folder above it already does. cargo check -p vectorcraft-engine --target wasm32-unknown-unknown: 2 warnings in vectorcraft-engine before, 0 after. The manifest and patch warnings it also prints are unchanged. --- crates/engine/src/cmd/plugin.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/engine/src/cmd/plugin.rs b/crates/engine/src/cmd/plugin.rs index 10899074d9..c8a3c2b46a 100644 --- a/crates/engine/src/cmd/plugin.rs +++ b/crates/engine/src/cmd/plugin.rs @@ -1914,6 +1914,9 @@ pub(crate) fn install_folder(s: &mut Session, load: &mut FolderPending, turn: &S /// the grants of ids whose module lists no permissions are forgotten while no `plugin.install` can /// record one for another module → its report; saves the disabled list when loading changed it. pub(crate) fn end_folder(s: &mut Session, mut load: FolderPending, turn: &StoreTurn) -> Value { + // Only native builds load modules, so only they save the disabled list. + #[cfg(target_arch = "wasm32")] + let _ = (s, turn); let (report, retry) = match load.load.take() { #[cfg(not(target_arch = "wasm32"))] Some(Ok(modules)) => {