chore: edition 2024

This commit is contained in:
Lucas Nogueira
2026-09-26 15:36:22 -03:00
parent b517cc7e85
commit 3d8a3c877b
100 changed files with 276 additions and 253 deletions
@@ -4,7 +4,7 @@ version = "0.1.0"
description = "A Tauri App"
authors = ["You"]
repository = ""
edition = "2021"
edition = "2024"
rust-version = "1.90"
[dependencies]
+1 -1
View File
@@ -15,7 +15,7 @@
)]
#![cfg(not(any(target_os = "android", target_os = "ios")))]
use tauri::{plugin::TauriPlugin, AppHandle, Manager, Runtime};
use tauri::{AppHandle, Manager, Runtime, plugin::TauriPlugin};
#[cfg(target_os = "windows")]
#[path = "platform_impl/windows.rs"]
@@ -7,8 +7,8 @@ use crate::semver_compat::semver_compat_string;
use crate::SingleInstanceCallback;
use tauri::{
plugin::{self, TauriPlugin},
AppHandle, Manager, RunEvent, Runtime,
plugin::{self, TauriPlugin},
};
use zbus::{blocking::Connection, interface, names::WellKnownName};
@@ -101,12 +101,11 @@ pub fn init<R: Runtime>(
}
pub fn destroy<R: Runtime, M: Manager<R>>(manager: &M) {
if let Some(connection) = manager.try_state::<ConnectionHandle>() {
if let Some(dbus_name) = manager
if let Some(connection) = manager.try_state::<ConnectionHandle>()
&& let Some(dbus_name) = manager
.try_state::<DBusName>()
.and_then(|name| WellKnownName::try_from(name.0.clone()).ok())
{
let _ = connection.0.release_name(dbus_name);
}
}
}
@@ -8,12 +8,12 @@ use std::{
path::PathBuf,
};
use crate::SingleInstanceCallback;
#[cfg(feature = "semver")]
use crate::semver_compat::semver_compat_string;
use crate::SingleInstanceCallback;
use tauri::{
plugin::{self, TauriPlugin},
AppHandle, Config, Manager, RunEvent, Runtime,
plugin::{self, TauriPlugin},
};
use tokio::io::AsyncReadExt;
@@ -8,20 +8,20 @@ use crate::semver_compat::semver_compat_string;
use crate::SingleInstanceCallback;
use std::ffi::CStr;
use tauri::{
plugin::{self, TauriPlugin},
AppHandle, Manager, RunEvent, Runtime,
plugin::{self, TauriPlugin},
};
use windows_sys::Win32::{
Foundation::{CloseHandle, GetLastError, ERROR_ALREADY_EXISTS, HWND, LPARAM, LRESULT, WPARAM},
Foundation::{CloseHandle, ERROR_ALREADY_EXISTS, GetLastError, HWND, LPARAM, LRESULT, WPARAM},
System::{
DataExchange::COPYDATASTRUCT,
LibraryLoader::GetModuleHandleW,
Threading::{CreateMutexW, ReleaseMutex},
},
UI::WindowsAndMessaging::{
self as w32wm, AllowSetForegroundWindow, CreateWindowExW, DefWindowProcW, DestroyWindow,
FindWindowW, GetWindowThreadProcessId, RegisterClassExW, SendMessageW, CREATESTRUCTW,
GWLP_USERDATA, GWL_STYLE, WINDOW_LONG_PTR_INDEX, WM_COPYDATA, WM_CREATE, WM_DESTROY,
self as w32wm, AllowSetForegroundWindow, CREATESTRUCTW, CreateWindowExW, DefWindowProcW,
DestroyWindow, FindWindowW, GWL_STYLE, GWLP_USERDATA, GetWindowThreadProcessId,
RegisterClassExW, SendMessageW, WINDOW_LONG_PTR_INDEX, WM_COPYDATA, WM_CREATE, WM_DESTROY,
WNDCLASSEXW, WS_EX_LAYERED, WS_EX_NOACTIVATE, WS_EX_TOOLWINDOW, WS_EX_TRANSPARENT,
WS_OVERLAPPED, WS_POPUP, WS_VISIBLE,
},