mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2025-11-15 01:01:25 +10:00
Clippy CI/CD (#67)
* feat: add clippy ci * fix: clippy errors * fix: ci/cd * fix: update ci packages * fix: add gtk3 to ci deps * fix: add webkit to ci deps * fix: ci deps and perms * fix: add clippy settings to lib.rs
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
#![feature(fn_traits)]
|
||||
#![deny(clippy::all)]
|
||||
|
||||
mod database;
|
||||
mod games;
|
||||
@ -24,7 +25,7 @@ use database::models::data::GameDownloadStatus;
|
||||
use download_manager::commands::{
|
||||
cancel_game, move_download_in_queue, pause_downloads, resume_downloads,
|
||||
};
|
||||
use download_manager::download_manager::DownloadManager;
|
||||
use download_manager::download_manager_frontend::DownloadManager;
|
||||
use download_manager::download_manager_builder::DownloadManagerBuilder;
|
||||
use games::collections::commands::{
|
||||
add_game_to_collection, create_collection, delete_collection, delete_game_in_collection,
|
||||
@ -184,7 +185,7 @@ fn setup(handle: AppHandle) -> AppState<'static> {
|
||||
}
|
||||
}
|
||||
|
||||
info!("detected games missing: {:?}", missing_games);
|
||||
info!("detected games missing: {missing_games:?}");
|
||||
|
||||
let mut db_handle = borrow_db_mut_checked();
|
||||
for game_id in missing_games {
|
||||
@ -201,7 +202,7 @@ fn setup(handle: AppHandle) -> AppState<'static> {
|
||||
|
||||
// Sync autostart state
|
||||
if let Err(e) = sync_autostart_on_startup(&handle) {
|
||||
warn!("failed to sync autostart state: {}", e);
|
||||
warn!("failed to sync autostart state: {e}");
|
||||
}
|
||||
|
||||
AppState {
|
||||
@ -224,7 +225,7 @@ pub fn custom_panic_handler(e: &PanicHookInfo) -> Option<()> {
|
||||
.as_secs()
|
||||
));
|
||||
let mut file = File::create_new(crash_file).ok()?;
|
||||
file.write_all(format!("Drop crashed with the following panic:\n{}", e).as_bytes()).ok()?;
|
||||
file.write_all(format!("Drop crashed with the following panic:\n{e}").as_bytes()).ok()?;
|
||||
drop(file);
|
||||
|
||||
Some(())
|
||||
@ -381,11 +382,7 @@ pub fn run() {
|
||||
if let Some(original) = db_handle.prev_database.take() {
|
||||
warn!(
|
||||
"Database corrupted. Original file at {}",
|
||||
original
|
||||
.canonicalize()
|
||||
.unwrap()
|
||||
.to_string_lossy()
|
||||
.to_string()
|
||||
original.canonicalize().unwrap().to_string_lossy()
|
||||
);
|
||||
app.dialog()
|
||||
.message(
|
||||
@ -441,7 +438,7 @@ pub fn run() {
|
||||
});
|
||||
}
|
||||
|
||||
fn run_on_tray<T: FnOnce() -> ()>(f: T) {
|
||||
fn run_on_tray<T: FnOnce()>(f: T) {
|
||||
if match std::env::var("NO_TRAY_ICON") {
|
||||
Ok(s) => s.to_lowercase() != "true",
|
||||
Err(_) => true,
|
||||
|
||||
Reference in New Issue
Block a user