Skip to content

Commit

Permalink
Refactor: 不要な mut とコメントを削除
Browse files Browse the repository at this point in the history
  • Loading branch information
shm11C3 committed Nov 20, 2024
1 parent 89d490d commit eb51351
Showing 1 changed file with 32 additions and 33 deletions.
65 changes: 32 additions & 33 deletions src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,40 +53,39 @@ pub fn run() {
process_memory_histories,
);

let mut builder = Builder::<tauri::Wry>::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::<tauri::Wry>::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(
Expand Down

0 comments on commit eb51351

Please sign in to comment.