mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-30 10:14:46 +01:00
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.
This commit is contained in:
1 parent
3264cd3b21
commit
91e4c6fbce
1 file changed
+3
@@ -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)) => {
|
||||
|
||||
Reference in new issue
Block a user