From 44498043d871ae11a5b2a230ce0b737a44009a31 Mon Sep 17 00:00:00 2001 From: forkless Date: Mon, 1 Jun 2026 16:18:40 +0200 Subject: [PATCH] Complete inline doc comments for all public functions --- Cargo.lock | 2 +- src/guard.rs | 4 ++++ src/tui.rs | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index a44c8d5..b1a0bb4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -440,7 +440,7 @@ dependencies = [ [[package]] name = "notalterra" -version = "0.2.0" +version = "0.2.2" dependencies = [ "anyhow", "chrono", diff --git a/src/guard.rs b/src/guard.rs index 922a0cd..d1f1aaa 100644 --- a/src/guard.rs +++ b/src/guard.rs @@ -13,6 +13,8 @@ use std::path::{Path, PathBuf}; // ── process detection ────────────────────────────────────────────────────── /// Return `true` if Subnautica 2 appears to be running. +/// Check if Subnautica 2 is currently running (Windows). +/// Process detection is disabled — returns `false` to avoid AV false positives. #[cfg(target_os = "windows")] pub fn game_running() -> bool { // Process detection disabled — avoid AV false-positives. @@ -30,6 +32,8 @@ fn _game_running_windows() -> bool { } } +/// Check if Subnautica 2 is currently running (Linux). +/// Process detection is disabled — always returns `false` to avoid AV false positives. #[cfg(not(target_os = "windows"))] pub fn game_running() -> bool { false diff --git a/src/tui.rs b/src/tui.rs index 02d4395..7a6eb3f 100644 --- a/src/tui.rs +++ b/src/tui.rs @@ -232,6 +232,8 @@ pub fn draw_confirm_popup( draw_whale_separator(f, bar, app); } +/// Render a simple informational dialog with a message. +/// Shows title, body text, and an OK button. pub fn draw_ok_dialog(f: &mut Frame, app: &AppState, title: &str, message: &str) { let content_w = message.lines().map(|l| l.len()).max().unwrap_or(20).max(title.len()) as u16 + 10; let popup_w = content_w.max(50).min(f.area().width.saturating_sub(4)); @@ -252,6 +254,7 @@ pub fn draw_ok_dialog(f: &mut Frame, app: &AppState, title: &str, message: &str) draw_whale_separator(f, bar, app); } +/// Render a dialog with styled content lines.\n/// Supports inline formatting (colors, bold) via [`Line`]. pub fn draw_ok_dialog_styled(f: &mut Frame, app: &AppState, title: &str, lines: &[Line]) { let content_w = lines.iter().map(|l| l.width() as u16).max().unwrap_or(20).max(title.len() as u16) + 10; let popup_w = content_w.max(50).min(f.area().width.saturating_sub(4));