From eda62884a486ada0f5636cce81ba5c43f97bdbc0 Mon Sep 17 00:00:00 2001 From: forkless Date: Tue, 2 Jun 2026 17:35:44 +0200 Subject: [PATCH] fix clippy lints for CI compatibility --- CHANGELOG.md | 5 +++++ src/main.rs | 39 ++++++++++++--------------------------- src/tui.rs | 2 +- 3 files changed, 18 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c464df0..c62ee91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,11 @@ All notable changes to NotAlterra are documented in this file. - **`is_cloud_path()` removed** — was only used by the discovery-era cloud detection path. +### Notes +- Working copy diverged from remote after signing the previous commit + on a different clone. Resolved via `git reset --soft origin/master` + (no content lost, identical tree). + ## [v0.2.3] — 2026-06-01 - Zero compiler warnings (`deny(unsafe_code)`, `allow(dead_code)` where intentional) diff --git a/src/main.rs b/src/main.rs index d2297ad..9e8bce7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -276,9 +276,6 @@ fn run_disclaimer(terminal: &mut Terminal, app: &mut App) -> Resu } -/// Scan the local filesystem for Subnautica 2 save folders. -/// -/// Spawns a background thread for the scan and shows a live elapsed timer. // ── menu actions ─────────────────────────────────────────────────────────── /// Open the input dialog for the user to type a save-folder path. @@ -330,30 +327,20 @@ fn action_set_save_folder(terminal: &mut Terminal, app: &mut App) input_state.cancelled = true; return Ok(()); } - KeyCode::Char(c) => { - if ok_selected { - input_state.insert(c); - } + KeyCode::Char(c) if ok_selected => { + input_state.insert(c); } - KeyCode::Backspace => { - if ok_selected { - input_state.backspace(); - } + KeyCode::Backspace if ok_selected => { + input_state.backspace(); } - KeyCode::Delete => { - if ok_selected { - input_state.delete(); - } + KeyCode::Delete if ok_selected => { + input_state.delete(); } - KeyCode::Left => { - if ok_selected { - input_state.cursor_left(); - } + KeyCode::Left if ok_selected => { + input_state.cursor_left(); } - KeyCode::Right => { - if ok_selected { - input_state.cursor_right(); - } + KeyCode::Right if ok_selected => { + input_state.cursor_right(); } KeyCode::Tab => { ok_selected = !ok_selected; @@ -365,10 +352,8 @@ fn action_set_save_folder(terminal: &mut Terminal, app: &mut App) _ => {} } } - Event::Paste(s) => { - if ok_selected { - input_state.insert_str(&s); - } + Event::Paste(s) if ok_selected => { + input_state.insert_str(&s); } _ => {} } diff --git a/src/tui.rs b/src/tui.rs index 1bee764..a91c9a5 100644 --- a/src/tui.rs +++ b/src/tui.rs @@ -736,7 +736,7 @@ pub fn draw_input_dialog( ); // Input line with cursor - let cursor_visible = (std::time::Instant::now().elapsed().as_millis() / 500) % 2 == 0; + let cursor_visible = (std::time::Instant::now().elapsed().as_millis() / 500).is_multiple_of(2); let mut input_spans = vec![ Span::styled(" ", Style::default()), ];