[desktop] fix: Rust compilation warnings in Tauri project
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
/// Struct representing an RGB color
|
/// Struct representing an RGB color
|
||||||
|
#[allow(dead_code)] // Suppress warnings for unused fields in this struct only
|
||||||
pub(crate) struct Rgb(pub(crate) u32, pub(crate) u32, pub(crate) u32);
|
pub(crate) struct Rgb(pub(crate) u32, pub(crate) u32, pub(crate) u32);
|
||||||
|
|
||||||
impl FromStr for Rgb {
|
impl FromStr for Rgb {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
|
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
|
||||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
||||||
|
|
||||||
use std::{env, path::Path, time::Duration};
|
use std::{env, time::Duration};
|
||||||
|
|
||||||
use tauri::{AppHandle, Emitter, Listener, Manager, RunEvent, WindowEvent};
|
use tauri::{AppHandle, Emitter, Listener, Manager, RunEvent, WindowEvent};
|
||||||
|
|
||||||
@@ -139,7 +139,7 @@ fn main() {
|
|||||||
|
|
||||||
// TODO(vladimir): Permission for logs/app2 folder are not guaranteed. Use the default location for now.
|
// TODO(vladimir): Permission for logs/app2 folder are not guaranteed. Use the default location for now.
|
||||||
#[cfg(target_os = "windows")]
|
#[cfg(target_os = "windows")]
|
||||||
let log_target = if let Some(data_dir) = cli_args.data {
|
let log_target = if let Some(_) = cli_args.data {
|
||||||
tauri_plugin_log::Target::new(tauri_plugin_log::TargetKind::LogDir { file_name: None })
|
tauri_plugin_log::Target::new(tauri_plugin_log::TargetKind::LogDir { file_name: None })
|
||||||
} else {
|
} else {
|
||||||
tauri_plugin_log::Target::new(tauri_plugin_log::TargetKind::Stdout)
|
tauri_plugin_log::Target::new(tauri_plugin_log::TargetKind::Stdout)
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ use crate::portapi::client::*;
|
|||||||
use crate::portapi::message::*;
|
use crate::portapi::message::*;
|
||||||
use crate::portapi::models::notification::*;
|
use crate::portapi::models::notification::*;
|
||||||
use crate::portapi::types::*;
|
use crate::portapi::types::*;
|
||||||
use log::debug;
|
|
||||||
use log::error;
|
use log::error;
|
||||||
use serde_json::json;
|
use serde_json::json;
|
||||||
use tauri::async_runtime;
|
use tauri::async_runtime;
|
||||||
|
|||||||
Reference in New Issue
Block a user