From 523848236c1efc8b7bf65d93682a748fd6db6c75 Mon Sep 17 00:00:00 2001 From: photovoltex Date: Thu, 14 Mar 2024 22:45:04 +0100 Subject: [PATCH] formatting and doc adjustment --- src/command/type_aliases.rs | 2 +- test-project/api/src/lib.rs | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/command/type_aliases.rs b/src/command/type_aliases.rs index 5e016e0..65449b1 100644 --- a/src/command/type_aliases.rs +++ b/src/command/type_aliases.rs @@ -1,6 +1,6 @@ use tauri::{AppHandle, State, Window}; -#[allow(unused_imports)] +#[cfg(doc)] use tauri_interop_macro::command; /// Type alias to easier identify [State] via [command] macro diff --git a/test-project/api/src/lib.rs b/test-project/api/src/lib.rs index e0ec511..5a74af0 100644 --- a/test-project/api/src/lib.rs +++ b/test-project/api/src/lib.rs @@ -2,13 +2,18 @@ #![feature(iter_intersperse)] #![feature(proc_macro_hygiene)] +#[cfg(target_family = "wasm")] +pub use tauri_interop::*; + #[tauri_interop::commands] pub mod cmd; pub mod model; -#[cfg(target_family = "wasm")] -pub use tauri_interop::*; - -// todo: see that we maybe resolve this automatically when the commands are autogenerated by the feature -tauri_interop::combine_handlers!( cmd, model::other_cmd, model::test_mod, model::NamingTestEnumField, model::naming_test_default ); +tauri_interop::combine_handlers!( + cmd, + model::other_cmd, + model::test_mod, + model::NamingTestEnumField, + model::naming_test_default +);