From 3601865a7527acc0cde4351feb00e7a72982e302 Mon Sep 17 00:00:00 2001 From: Tw93 Date: Sat, 14 Jan 2023 10:34:03 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E6=9B=B4=E6=96=B0=E4=B8=8B=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-tauri/src/main.rs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index fb0eed7..c136d52 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -1,8 +1,6 @@ // at the top of main.rs - that will prevent the console from showing #![windows_subsystem = "windows"] extern crate image; -use dirs::download_dir; -use std::path::PathBuf; use tauri_utils::config::{Config, WindowConfig}; use wry::{ application::{ @@ -14,11 +12,6 @@ use wry::{ webview::WebViewBuilder, }; -enum UserEvent { - DownloadStarted(String, String), - DownloadComplete(Option, bool), -} - #[cfg(target_os = "macos")] use wry::application::{ accelerator::{Accelerator, SysMods}, @@ -33,6 +26,14 @@ use wry::application::window::Icon; #[cfg(any(target_os = "linux", target_os = "windows"))] use wry::webview::WebContext; +use dirs::download_dir; +use std::path::PathBuf; + +enum UserEvent { + DownloadStarted(String, String), + DownloadComplete(Option, bool), +} + fn main() -> wry::Result<()> { #[cfg(target_os = "macos")] let (menu_bar_menu, close_item) = {