From efdb04db8a41e1d244a9585ab0ef3589880d24a8 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Fri, 16 Oct 2026 08:14:21 -0700 Subject: [PATCH] Lint: action_batch.rs compiles without an unused import on wasm32 On main, cargo xtask wasm printed an unused-import warning for json in crates/engine/src/cmd/fileio/action_batch.rs, and this check reported it as an error: RUSTFLAGS=-Dwarnings cargo check -p vectorcraft-engine --target wasm32-unknown-unknown Every use of json! in action_batch.rs is in code compiled only for native targets. The wasm32 version of action_batch uses Value only. The json import now has the same #[cfg(not(target_arch = "wasm32"))] attribute as the code that uses it. Native builds import the same names as before. --- crates/engine/src/cmd/fileio/action_batch.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/engine/src/cmd/fileio/action_batch.rs b/crates/engine/src/cmd/fileio/action_batch.rs index ccc486896..f81957ff3 100644 --- a/crates/engine/src/cmd/fileio/action_batch.rs +++ b/crates/engine/src/cmd/fileio/action_batch.rs @@ -5,7 +5,9 @@ //! Save and Close, or Folder; Override Open / Save / Export. Cited: //! -use serde_json::{Value, json}; +use serde_json::Value; +#[cfg(not(target_arch = "wasm32"))] +use serde_json::json; use super::super::*;