From eb51351d073316e8446729cd42be6426d68d6f99 Mon Sep 17 00:00:00 2001 From: shm Date: Thu, 21 Nov 2024 00:46:09 +0900 Subject: [PATCH] =?UTF-8?q?Refactor:=20=E4=B8=8D=E8=A6=81=E3=81=AA=20mut?= =?UTF-8?q?=20=E3=81=A8=E3=82=B3=E3=83=A1=E3=83=B3=E3=83=88=E3=82=92?= =?UTF-8?q?=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-tauri/src/lib.rs | 65 ++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index e7859e4..c5c4f5e 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -53,40 +53,39 @@ pub fn run() { process_memory_histories, ); - let mut builder = Builder::::new() - // Then register them (separated by a comma) - .commands(collect_commands![ - hardware::get_process_list, - hardware::get_cpu_usage, - hardware::get_hardware_info, - hardware::get_memory_usage, - hardware::get_gpu_usage, - hardware::get_gpu_temperature, - hardware::get_nvidia_gpu_cooler, - hardware::get_cpu_usage_history, - hardware::get_memory_usage_history, - hardware::get_gpu_usage_history, - config::commands::get_settings, - config::commands::set_language, - config::commands::set_theme, - config::commands::set_display_targets, - config::commands::set_graph_size, - config::commands::set_line_graph_border, - config::commands::set_line_graph_fill, - config::commands::set_line_graph_color, - config::commands::set_line_graph_mix, - config::commands::set_line_graph_show_legend, - config::commands::set_line_graph_show_scale, - config::commands::set_background_img_opacity, - config::commands::set_state, - config::commands::set_selected_background_img, - background_image::get_background_image, - background_image::get_background_images, - background_image::save_background_image, - background_image::delete_background_image, - ui::set_decoration, - ]); + let builder = Builder::::new().commands(collect_commands![ + hardware::get_process_list, + hardware::get_cpu_usage, + hardware::get_hardware_info, + hardware::get_memory_usage, + hardware::get_gpu_usage, + hardware::get_gpu_temperature, + hardware::get_nvidia_gpu_cooler, + hardware::get_cpu_usage_history, + hardware::get_memory_usage_history, + hardware::get_gpu_usage_history, + config::commands::get_settings, + config::commands::set_language, + config::commands::set_theme, + config::commands::set_display_targets, + config::commands::set_graph_size, + config::commands::set_line_graph_border, + config::commands::set_line_graph_fill, + config::commands::set_line_graph_color, + config::commands::set_line_graph_mix, + config::commands::set_line_graph_show_legend, + config::commands::set_line_graph_show_scale, + config::commands::set_background_img_opacity, + config::commands::set_state, + config::commands::set_selected_background_img, + background_image::get_background_image, + background_image::get_background_images, + background_image::save_background_image, + background_image::delete_background_image, + ui::set_decoration, + ]); + // TS bindings #[cfg(debug_assertions)] builder .export(